PEP 318: Can't we all just get along?
Arthur
ajsiegel at optonline.com
Fri Aug 20 11:10:52 EDT 2004
On Fri, 20 Aug 2004 05:45:11 -0400, Paul Morrow <pm_mon at yahoo.com>
wrote:
>Roy Smith wrote:
>>
>> I never quite understood the point of static methods inside classes.
>> When would you ever need to do that, as opposed to just a function in a
>> module? In Java's "everything is part of a class" philosophy, it makes
>> sense, but in Python?
>
>It gives us another means of managing namespaces. Rather than having to
>create a top-level function in the current (or some other) module, we
>can group it with other related functions as a method in a class.
"Another" means Precisely. It is not, however, the embedded means.
And though the language provides this flexibility, one pays a small
penalty. Some typing and a loss of readibility/elegance - whatever you
might want to call it.
Heh. The trade-offs are clear and the decision is in the hands o f the
developer.
Which is kinda typical of the kinds of decision one expects to face,
as a developer. No?
What, again , is the problem?
Art
More information about the Python-list
mailing list