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
operator.

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.

tjr

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to