why no 'length' method in sequences ?

Richard Gruet rjgruet at yahoo.com
Thu Apr 18 12:05:35 EDT 2002


Hi all

I wonder why there is no 'length' (or 'len') method - or attribute - in the
sequences types. Having to use the built-in function len() doesn't sound
very Object-Oriented to me. I understand that the built-in function len()
must be kept for compatibility reasons, but why not to add also the method
len() to the sequence types ? Is there a reason ?

(My apologies if this issue has already been raised. I searched the archives
but found nothing)

Richard Gruet

Advertisement ! Do you know the Python Quick Reference (see
http://rgruet.free.fr) ? It's currently for 2.0 and 2.1, but a version 2.2
should be available in the near future.





More information about the Python-list mailing list