Unexpected __metaclass__ method behavior

anne.nospam01 at wangnick.de anne.nospam01 at wangnick.de
Mon Dec 31 07:06:31 EST 2007


Well, you see, I have some database functions that deal with "things"
which are either classes or instances thereof. I though polymorphism
would be a nice way to handle them identically, like:

def do(thing): thing.Foo()
do(t)
do(Test)

But never mind, I now understand that Test.__dict__ can contain only
one entry for 'Foo', and that this must be matched.

Kind regards,
Sebastian



More information about the Python-list mailing list