[Python-Dev] PyXXX_Size vs. PyXXX_Length

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Tue, 11 Jul 2000 11:32:44 +0200 (CEST)

Fredrik Lundh wrote:
> jeremy wrote:
> > 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?
> don't forget PyObject_Length and PyMapping_Length...

Why deprecate? There's nothing wrong with these names.
However, for conveniency, it would make sense to have
PyXXX_Size macros, synonyms for the PyXXX_Length functions.

Or vice versa. Have _Length macros, synonyms for _Size functions.
However, this is not backwards (binary) compatible, which I
believe is harmless for a new release, but the recent Windows
DLL thread reminds that bin compatibility accross versions
is somewhat important.

       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252