Indirect Class Instance Invocation
John Bell
jbell at iinet.net.au
Mon Nov 12 20:04:15 EST 2001
John Bell wrote:
> I feel that this should be do-able, but can't see how. If I have some
> class foo and string s='foo', can I invoke bar as an instance of foo
> given only the string s? (ie. bar=(something on s)() )A kind of setattr
> for classes rather than attributes.
>
> John
> Disregard that, I realised the error of my ways a couple of minutes after
> posting. I need more sleep!
More information about the Python-list
mailing list