enthought/enaml — Issue #65: enaml_component subclass of function with derivation info
Author: timdiller
Created: 2012-01-04 21:39:37+00:00
State: open
Labels: FEATURE

To aid in introspection and automatic documentation of derivation, it would be helpful if Enaml components were represented in Python as a subclass of the Python function with added metadata that includes a string giving the name of the component it was derived from.

For instance, in enaml/stdlib/fields.enaml, IntField is declared as
IntField(ErrorField)

We would want something like this:

```>>> import enaml
>>> enaml.import_hooks.EnamlImporter.install()
>>> from enaml.stdlib.fields import IntField
>>> IntField.__derives_from__
"ErrorField" ```