[IPython-dev] IPython traitlet problem
Sun Apr 21 16:54:23 CDT 2013
The only reason I can see for not allowing `*args` would be preserving a
Traits behavior, but if this isn't how Traits behaves, then there's really
no reason not to fix it <https://github.com/ipython/ipython/pull/3205>.
On Sun, Apr 21, 2013 at 12:26 PM, Robert McGibbon <email@example.com>wrote:
> I would be +1 on allowing position arguments to the constructor, if its
> that easy.
> This feature/bug has bitten me before, which is why I remembered that error
> In general, with traitlets, you really end up moving a lot of logic out of
> the __init__
> method, and into _X_changed or _X_default, so it doesn't end up being that
> On Apr 21, 2013, at 6:17 AM, Robert Kern wrote:
> > On 2013-04-21 16:43, Thomas Kluyver wrote:
> >> 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,
> >> I agree that this limitation in traitlets isn't ideal.
> > It's relatively easily fixed. Just include *args in the __new__() and
> > and ignore them.
> > I don't recall, but this might have been an explicit design choice for
> > in order to force the use of keyword arguments exclusively. It is a
> > from Traits behavior.
> > --
> > Robert Kern
> > "I have come to believe that the whole world is an enigma, a harmless
> > that is made terrible by our own mad attempt to interpret it as though
> it had
> > an underlying truth."
> > -- Umberto Eco
> > _______________________________________________
> > IPython-dev mailing list
> > IPythonfirstname.lastname@example.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev