[Python-Dev] PyXXX_Size vs. PyXXX_Length

Mark Hammond MarkH@ActiveState.com
Wed, 12 Jul 2000 10:47:40 -0400


> Tuple, List, String, and Dict have a PyXXX_Size method.  The abstract
> object interface uses PySequence_Length.  This is inconsistent and
> hard to remember.  Can we add PySequence_Size and mark Length as
> deprecated?

I definately prefer "length" - for example, with Unicode, PyUnicode_Size()
implies the number of bytes (the size of the data structure) while
PyUnicode_Length() implies the number of characters.

Mark.