Indirect Class Instance Invocation
jbell at iinet.net.au
Tue Nov 13 02:04:15 CET 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.
> 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