classmethods, class variables and subclassing
Andrew Jaffe
a.h.jaffe at bakerjaffe.plus.com
Fri Oct 21 06:49:10 EDT 2005
Steve Holden wrote:
> Andrew Jaffe wrote:
>
>>The problem is that I actually do want to call these methods on the
>>class itself, before I've made any instances.
>>
> Except you could use staticmethods with an explicit class argument ...
Steve,
Yep, that would work! Thanks.
But it does seem like a bit of a kludge: classmethods seems to be almost
exactly what you 'ought' to use here (i.e., I really do want to apply
these methods to the class as an object in its own right).
A
More information about the Python-list
mailing list