[EMAIL PROTECTED] a écrit :
> 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.

You may want to have a look at FormEncode's "declarative" API, with 
particular attention to the 'classinstancemethod' stuff.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to