Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-02-13 Thread Serhiy Storchaka
On 13.02.16 10:48, Georg Brandl wrote: Following the same rules for placement, underscores will be allowed in the following constructors: - ``int()`` (with any base) - ``float()`` - ``complex()`` - ``Decimal()`` What about float.fromhex()? Should underscores be allowed in it (I think no)?

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-02-13 Thread Georg Brandl
On 02/13/2016 12:10 PM, Serhiy Storchaka wrote: > On 13.02.16 10:48, Georg Brandl wrote: >> Following the same rules for placement, underscores will be allowed in >> the following constructors: >> >> - ``int()`` (with any base) >> - ``float()`` >> - ``complex()`` >> - ``Decimal()`` > > What about

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-02-13 Thread Steven D'Aprano
On Sat, Feb 13, 2016 at 09:48:49AM +0100, Georg Brandl wrote: > Hi all, > > after talking to Guido and Serhiy we present the next revision > of this PEP. It is a compromise that we are all happy with, > and a relatively restricted rule that makes additions to PEP 8 > basically unnecessary. > >

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-02-13 Thread Glenn Linderman
On 2/13/2016 12:48 AM, Georg Brandl wrote: Instead of the relatively strict rule specified above, the use of underscores could be limited. This sentence doesn't really make sense. Either s/limited/more limited/ or s/limited/further limited/ or s/limited/relaxed/ Maybe the whole section should

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-02-13 Thread Ethan Furman
On 02/13/2016 12:48 AM, Georg Brandl wrote: The remaining open question is about the reverse direction: do we want a string formatting modifier that adds underscores as thousands separators? +0 Would be nice, but also wouldn't make much sense in other groupings. Instead of the relatively

[Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-02-13 Thread Georg Brandl
Hi all, after talking to Guido and Serhiy we present the next revision of this PEP. It is a compromise that we are all happy with, and a relatively restricted rule that makes additions to PEP 8 basically unnecessary. I think the discussion has shown that supporting underscores in the

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-02-13 Thread Brett Cannon
On Sat, Feb 13, 2016, 00:49 Georg Brandl wrote: > Hi all, > > after talking to Guido and Serhiy we present the next revision > of this PEP. It is a compromise that we are all happy with, > and a relatively restricted rule that makes additions to PEP 8 > basically unnecessary.