Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Greg Ewing
Guido van Rossum wrote: On Mon, Jan 19, 2015 at 11:43 AM, Paul Sokolovsky > wrote: b.lower_inplace() b.lower_i() Please don't go there. The use cases are too rare. And if you have such a use case, it's not too hard to do b[:] = b.lower() -- Greg _

Re: [Python-Dev] Why are generated files in the repository?

2015-01-19 Thread Benjamin Peterson
On Mon, Jan 19, 2015, at 19:40, Neil Girdhar wrote: > I was also wondering why files like Python/graminit.c are in the > respository? They generate spurious merge conflicts. Convenience mostly. ___ Python-Dev mailing list Python-Dev@python.org https:/

[Python-Dev] Why are generated files in the repository?

2015-01-19 Thread Neil Girdhar
Hi everyone, I tried to work on PEP 448 and updated the latest patch to Python 3.5. I uploaded the new diff here: http://bugs.python.org/issue2292. I don't know how to debug further. Is there a way to view the compiled output despite Python not starting up? I was also wondering why files like

Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Paul Sokolovsky
Hello, On Mon, 19 Jan 2015 14:03:20 -0800 Guido van Rossum wrote: > On Mon, Jan 19, 2015 at 11:43 AM, Paul Sokolovsky > wrote: > > > [...] > > So, suppose there's a requirement to support inplace operations > > (methods) on bytearray, what would be Pythonic way to implement it? > > > > Somethi

Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Guido van Rossum
On Mon, Jan 19, 2015 at 11:43 AM, Paul Sokolovsky 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

Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Paul Sokolovsky
Hello, On Mon, 19 Jan 2015 08:36:55 -0800 Ethan Furman wrote: > I was checking the documentation [1] to see where to put the new > information about bytes and bytearray %-formatting, and noticed > that /every/ operation that could modify a bytearray object in place > (e.g. center, capitalize, st

Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Antoine Pitrou
On Mon, 19 Jan 2015 12:01:36 -0500 "Eric V. Smith" wrote: > > I'd return a new copy (or, not implement it at all and let the default > machinery call __mod__, and do the assignment). That's the least > surprising to me, since the goal is to be compatible with 2.7's str > %-formatting. +1 for a c

Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Ethan Furman
On 01/19/2015 09:01 AM, Eric V. Smith wrote: > > I'd return a new copy (or, not implement it at all and let the default > machinery call __mod__, and do the assignment). That's the least > surprising to me, since the goal is to be compatible with 2.7's str > %-formatting. That certainly feels lik

Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Eric V. Smith
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/19/2015 11:36 AM, Ethan Furman wrote: > I was checking the documentation [1] to see where to put the new > information about bytes and bytearray %-formatting, and noticed > that /every/ operation that could modify a bytearray object in > place (e.

[Python-Dev] bytes & bytearray

2015-01-19 Thread Ethan Furman
I was checking the documentation [1] to see where to put the new information about bytes and bytearray %-formatting, and noticed that /every/ operation that could modify a bytearray object in place (e.g. center, capitalize, strip, etc.) instead returns a new copy. The section just prior to that

[Python-Dev] Undefined dlopen When Building Module On Android

2015-01-19 Thread Cyd Haselton
Hello, I'm struggling with a build issue on Android; I've posted to the general python list with no result, so I'm re-posting here in hopes that someone can help. If this is the wrong place feel free to let me know. I'm attempting to build Python 2.7.8 on my Android device; I'm using an environme