Re: Unexpected __metaclass__ method behavior
- From: anne.nospam01@xxxxxxxxxxx
- Date: Mon, 31 Dec 2007 04:06:31 -0800 (PST)
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
.
- Follow-Ups:
- Re: Unexpected __metaclass__ method behavior
- From: Arnaud Delobelle
- Re: Unexpected __metaclass__ method behavior
- References:
- Unexpected __metaclass__ method behavior
- From: anne . nospam01
- Re: Unexpected __metaclass__ method behavior
- From: Terry Reedy
- Unexpected __metaclass__ method behavior
- Prev by Date: Re: TK 8.5
- Next by Date: Re: Is there a string function to trim all non-ascii characters out of a string
- Previous by thread: Re: Unexpected __metaclass__ method behavior
- Next by thread: Re: Unexpected __metaclass__ method behavior
- Index(es):