Hello, On Mon, 19 Jan 2015 14:03:20 -0800 Guido van Rossum <guido at python.org> wrote: > On Mon, Jan 19, 2015 at 11:43 AM, Paul Sokolovsky <pmiscml at 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:pmiscml at gmail.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4