Static class methods
Alex Shindich
alex at shindich.com
Wed Mar 7 03:15:32 EST 2001
Hmm... I agree with you Alex that static methods are seldom needed in Python. I have lived without them for a long time.
The need actually arose from using the local functions. Ever since the scoping behavior was fixed, the local functions became really useful.
The problem however is that an instance method can have a local function, where a class cannot. This seems weird, since the level above the class-- the modules, can have functions. So can the level below-- the instance methods. But the classes cannot.
If anything, the absence of static methods creates an inconsistency in the way functions are handled in different scopes.
Regards,
Alex Shindich
visit http://www.shindich.com/sources
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20010307/6d0f9b27/attachment.html>
More information about the Python-list
mailing list