Package logilab :: Package common :: Module registry :: Class RegistrableInstance

[frames] | no frames]

# Class RegistrableInstance

source code

           object --+
                    |
    RegistrableObject --+
                        |
                       RegistrableInstance

    Inherit this class if you want instances of the classes to be
    automatically registered.

Instance Methods

a new object with type S, a subtype of T

__new__(cls, *args, **kwargs) Add a __module__ attribute telling the module where the instance was created, for automatic registration. | source code

Inherited from `RegistrableObject`: `__registries__` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
Inherited from `RegistrableObject`: `__abstract__`, `__regid__`, `__registry__`, `__select__`

Properties
Inherited from `object`: `__class__`

Method Details

### __new__(cls, *args, **kwargs)

source code

    Add a __module__ attribute telling the module where the instance was
    created, for automatic registration.

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