classmethods, class variables and subclassing
Steve Holden
steve at holdenweb.com
Fri Oct 21 07:39:25 EDT 2005
Andrew Jaffe wrote:
> 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).
>
What's the use case?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list