[IPython-dev] IPython traitlet problem

Matthias Vogelgesang matthias.vogelgesang@gmail....
Fri Apr 19 09:24:23 CDT 2013


I am considering the traitlets module for a project of mine but there
is one big problem: All classes that derive from HasTraits cannot have
parameters in their __init__() method, which makes traitlets pointless
for general purpose classes, e.g.

class Foo(HasTraits):
    x = Float()

    def __init__(self, bar):

gives me

  TypeError: __new__() takes exactly 1 argument (2 given)

Is this behaviour intentional?


Matthias Vogelgesang
Public-Key: http://tinyurl.com/2qcydl

More information about the IPython-dev mailing list