IPython :: utils :: traitlets :: MetaHasTraits :: Class MetaHasTraits
[hide private]
[frames] | no frames]

Type MetaHasTraits

object --+    
         |    
      type --+
             |
            MetaHasTraits

A metaclass for HasTraits.

This metaclass makes sure that any TraitType class attributes are instantiated and sets their name attribute.

Instance Methods [hide private]
the object's type
__init__(cls, name, bases, classdict)
Finish initializing the HasTraits class.

Inherited from type: __call__, __delattr__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __instancecheck__, __le__, __lt__, __ne__, __repr__, __setattr__, __subclasscheck__, __subclasses__, mro

Inherited from object: __format__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(mcls, name, bases, classdict)
Create the HasTraits class.
Properties [hide private]

Inherited from type: __abstractmethods__, __base__, __bases__, __basicsize__, __dictoffset__, __flags__, __itemsize__, __mro__, __name__, __weakrefoffset__

Inherited from object: __class__

Method Details [hide private]

__new__(mcls, name, bases, classdict)
Static Method

 

Create the HasTraits class.

This instantiates all TraitTypes in the class dict and sets their :attr:`name` attribute.

Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__init__(cls, name, bases, classdict)
(Constructor)

 

Finish initializing the HasTraits class.

This sets the :attr:`this_class` attribute of each TraitType in the class dict to the newly created class ``cls``.

Returns: the object's type
Overrides: object.__init__