In an inherited class, "embedded" classes is referenced?
Christian Joergensen
mail at razor.dk
Fri Dec 21 06:16:34 EST 2007
"Diez B. Roggisch" <deets at nospam.web.de> writes:
[...]
> The more important question is: what do you need C for? Do you have by
> any chance a Java-background and think of C as inner/nested class as
> in Java? This feature doesn't exist in Python.
I was working on some framework code where each class would have a
nested class containing meta information about the outer class
(because all properties would be treated in a special way by the
framework).
I needed to inherit two classes and got confused when they didn't
inherit their meta information - but referenced it :)
> Your workaround might be implementable using a metaclass in a more
> conveinient way, but I'm not sure-footed enough with metaclasses to
> provide a solution out of my head now.
That would be fun ;-)
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info
More information about the Python-list
mailing list