len() and PEP 3000
Colin J. Williams
cjw at sympatico.ca
Sat Dec 9 15:08:32 EST 2006
tac-tics wrote:
>> __len__ is not very special and the
>> property len eliminates the redundant parentheses.
>
> One might say the current syntax eliminates the redundant dot.
>
touché
On the other hand, one can argue that, since len is intimately
associated with an object, it's better treated as an attribute/property
than to have an unconnected function out in namespace.
Colin W.
More information about the Python-list
mailing list