[Python-3000] PEP 3137 plan of attack

Gregory P. Smith greg at krypto.org
Fri Oct 12 23:55:46 CEST 2007


> - add missing methods to PyBytes (for list, see the PEP and compare to
> > what's already there)
> >
>
As I work on these..  Should the mutable PyBytes_ (buffer) objects implement
the following methods inplace and return an additional reference to self?

.capitalize(), .center(), .expandtabs(), .rjust(), .swapcase(), .title(),
.upper(), .zfill()

Also what about .replace() and .translate()?

If they are not done in place should they return a new buffer (PyBytes_)
object or a bytes (PyString_) object?  [i'd say a buffer (PyBytes_)]

Alos if not, should we add additional .ireplace() .ilower() etc.. methods to
the mutable buffer (PyBytes_)?  There are speed advantages to doing many of
those in place rather than a data copy.

-gps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20071012/4fada1bb/attachment.htm 


More information about the Python-3000 mailing list