[IPython-dev] IPython traitlet problem

Thomas Kluyver takowl@gmail....
Sun Apr 21 06:13:14 CDT 2013


For what it's worth, Python 3 introduces keyword-only arguments, which can
be required arguments. That's specified as part of the function signature,
though; I agree that this limitation in traitlets isn't ideal.


On 21 April 2013 11:24, Matthias Vogelgesang <matthias.vogelgesang@gmail.com
> wrote:

> Hi Robert,
>
> On Sat, Apr 20, 2013 at 6:46 PM, Robert McGibbon <rmcgibbo@gmail.com>
> wrote:
> >
> > You just need to call the constructor with a keyword argument.
>
> This works very well, thanks. However, this behaviour kind of violates
> what I expect from a Python function: On the one hand, the argument is
> required (as expected with a positional argument) but on the other
> hand I have to use it like a keyword argument. This leaves a bitter
> taste to me, as I will always have to document this behaviour.
>
> Regards,
> Matthias
>
> --
> Matthias Vogelgesang
> Public-Key: http://tinyurl.com/2qcydl
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130421/a15f9b39/attachment.html 


More information about the IPython-dev mailing list