Hello,

On Mon, 19 Jan 2015 14:03:20 -0800
Guido van Rossum <gu...@python.org> wrote:

> On Mon, Jan 19, 2015 at 11:43 AM, Paul Sokolovsky <pmis...@gmail.com>
> wrote:
> 
> > [...]
> > So, suppose there's a requirement to support inplace operations
> > (methods) on bytearray, what would be Pythonic way to implement it?
> >
> > Something like:
> >
> > b.lower_inplace()
> > b.lower_i()
> >
> > , or maybe
> >
> > import bytearray_ops
> > bytearray_ops.lower(b)
> >
> > ?
> 
> 
> Please don't go there. The use cases are too rare.

recv_into() an HTTP request and .lower() it inplace to ease parsing?
But I mostly raise that with MicroPython hat on, there it may be not
necessarily superfluous. But then, having a separate module for such
operations doesn't seem too bad, except that it would be retrograde
action after "string" module deprecation in favor of methods.

Anyway, I targetted that question for python-ideas on some easy day, and
just took a quick chance here seeing someone else talking about inplace
bytearray operations ;-).

> 
> -- 
> --Guido van Rossum (python.org/~guido)


-- 
Best regards,
 Paul                          mailto:pmis...@gmail.com
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to