Re: [Python-Dev] Multiline with statement line continuation

2014-08-15 Thread Steven D'Aprano
On Fri, Aug 15, 2014 at 08:29:09PM -0700, Ethan Furman wrote: > On 08/15/2014 08:08 PM, Steven D'Aprano wrote: [...] > >is a poor argument (that is, I'm disagreeing with it), since *single* > >line parens-free with statements are already syntactically a tuple: > > > > with spam, eggs, cheese:

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-15 Thread Nick Coghlan
On 16 August 2014 03:48, Guido van Rossum wrote: > This feels chatty. I'd like the PEP to call out the specific proposals and > put the more verbose motivation later. I realised that some of that history was actually completely irrelevant now, so I culled a fair bit of it entirely. > It took me

Re: [Python-Dev] Multiline with statement line continuation

2014-08-15 Thread Ethan Furman
On 08/15/2014 08:08 PM, Steven D'Aprano wrote: On Fri, Aug 15, 2014 at 02:08:42PM -0700, Ethan Furman wrote: On 08/13/2014 10:32 AM, Steven D'Aprano wrote: (2) Also note that *this is already the case*, since tuples are made by the commas, not the parentheses. E.g. this succeeds: # Not a tupl

Re: [Python-Dev] Multiline with statement line continuation

2014-08-15 Thread Steven D'Aprano
On Fri, Aug 15, 2014 at 02:08:42PM -0700, Ethan Furman wrote: > On 08/13/2014 10:32 AM, Steven D'Aprano wrote: > > > >(2) Also note that *this is already the case*, since tuples are made by > >the commas, not the parentheses. E.g. this succeeds: > > > ># Not a tuple, actually two context managers.

Re: [Python-Dev] Multiline with statement line continuation

2014-08-15 Thread Georg Brandl
On 08/15/2014 11:08 PM, Ethan Furman wrote: > On 08/13/2014 10:32 AM, Steven D'Aprano wrote: >> >> (2) Also note that *this is already the case*, since tuples are made by >> the commas, not the parentheses. E.g. this succeeds: >> >> # Not a tuple, actually two context managers. >> with open("/tmp/f

Re: [Python-Dev] Multiline with statement line continuation

2014-08-15 Thread Ethan Furman
On 08/13/2014 10:32 AM, Steven D'Aprano wrote: (2) Also note that *this is already the case*, since tuples are made by the commas, not the parentheses. E.g. this succeeds: # Not a tuple, actually two context managers. with open("/tmp/foo"), open("/tmp/bar", "w"): pass Thanks for proving m

Re: [Python-Dev] Multiline with statement line continuation

2014-08-15 Thread Ethan Furman
On 08/12/2014 08:38 PM, Steven D'Aprano wrote: [1] Technically not, since it's the comma, not the ( ), which makes a tuple, but a lot of people don't know that and treat it as if it the parens were compulsary. It might as well be, because if there can be a non-tuple way to interpret the comma

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-15 Thread Victor Stinner
2014-08-15 7:50 GMT+02:00 Nick Coghlan : > As far as I am aware, that last item poses the only open question, > with the alternative being to add an "iterbytes" builtin (...) Do you have examples of use cases for a builtin function? I only found 5 usages of bytes((byte,)) constructor in the standa

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-15 Thread Victor Stinner
2014-08-15 21:54 GMT+02:00 Serhiy Storchaka : > 15.08.14 08:50, Nick Coghlan написав(ла): >> * add bytes.zeros() and bytearray.zeros() as a replacement > > b'\0' * n and bytearray(b'\0') * n look good replacements to me. No need to > learn new method. And it works right now. FYI there is a pending

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-15 Thread Serhiy Storchaka
15.08.14 08:50, Nick Coghlan написав(ла): * add bytes.zeros() and bytearray.zeros() as a replacement b'\0' * n and bytearray(b'\0') * n look good replacements to me. No need to learn new method. And it works right now. * add bytes.iterbytes(), bytearray.iterbytes() and memoryview.iterbytes(

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-15 Thread Guido van Rossum
This feels chatty. I'd like the PEP to call out the specific proposals and put the more verbose motivation later. It took me a long time to realize that you don't want to deprecate bytes([1, 2, 3]), but only bytes(3). Also your mention of bytes.byte() as the counterpart to ord() confused me -- I th

[Python-Dev] Summary of Python tracker Issues

2014-08-15 Thread Python tracker
ACTIVITY SUMMARY (2014-08-08 - 2014-08-15) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open4602 ( +0) closed 29371 (+31) total 33973 (+31) Open issues wit