[Python-3000] PEP 3137 plan of attack

Brett Cannon brett at python.org
Wed Oct 10 20:12:50 CEST 2007


On 10/10/07, Christian Heimes <lists at cheimes.de> wrote:
> Guido van Rossum wrote:
> > > The tasks I can think of are:
> [...]
>
> (Resend, the first mail didn't make it and I forgot a point)
>
> While I was working on a patch for the renaming of bytes and str8 I
> found some open issues that need to be discussed and addressed:
>
> - Create an iterator view for PyBytes. The buffer object doesn't have a
> view for iteration like bytes have with PyStringIter_Type. Guido said he
> wants a view to play nice with the Sequence ABC.
>
> - Should bytes (PyString_Type) subclass from basestring? It doesn't feel
> quite right to me. I think we could remove basestring completely if
> bytes doesn't subclass from it.
>
> - Do we need a common base type for bytes and buffer like e.g. basebytes?
>
> - The new bytes type (formally known as str8 / PyString_Type) still has
> a bunch of methods from its original Python 2.x parent:
>
> ['__add__', '__class__', '__contains__', '__delattr__', '__doc__',
> '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__',
> '__getnewargs__', '__gt__', '__hash__', '__init__', '__iter__',
> '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__',
> '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__',
> '__rmul__', '__setattr__', '__str__', 'capitalize', 'center', 'count',
> 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'index',
> 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle',
> 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace',
> 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split',
> 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate',
> 'upper', 'zfill']
>
> Should any of these methods be removed?
>

See PEP 3137; http://www.python.org/dev/peps/pep-3137/#methods .

-Brett


More information about the Python-3000 mailing list