classmethod() not inherited?
jack at performancedrivers.com
Thu Jan 16 10:43:35 CET 2003
How is it possible to have classmethods still be
classmethods in their kids?
-- file Test.py --
foo = classmethod(foo)
return 'some value'
return 'some other value'
return 'something else still'
I'd like to have ALL of the derivitives of Base
have foo as a classmethod, but it doesn't seem
to be automatic and the following doesn't work
for (Test.A .. Test.Z): # pseudo code
Test.A.foo = classmethod(Test.A.foo)
The Base class might have several classmethods
so adding all of them to each of the derivitives
is an error prone cut-n-paste nightmare.
google groups turns up lots of convos about type()
and new style classes, but I couldn't find anything
for this in particular. [I'm Running Python 2.2.1]
hating cut-n-paste-ly yours,
More information about the Python-list