What is not objects in Python?
tjreedy at udel.edu
Tue Sep 30 05:59:40 CEST 2008
Steven D'Aprano wrote:
> On Mon, 29 Sep 2008 05:41:02 -0700, George Sakkis wrote:
>> For example I would be much less
>> opposed to len() being defined as, say, |x| if "|...|" was a valid
> Arghh! No!!! |x| should be abs(x), not len(x). Just ask mathematicians
> and physicists.
It should be both, just as + is addition for numbers and concatenation
for sequences. Or we could have just one built-in -- size() instead of
abs() and len(). For non-sequence collections, size() would be better
than len() anyway.
More information about the Python-list