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

2016-05-12 Thread Brett Cannon
Marked as accepted in https://hg.python.org/peps/rev/a52066565cc2 On Thu, 12 May 2016 at 16:59 Guido van Rossum wrote: > Is anyone going to mark the PEP as accepted? > > On Thu, May 12, 2016 at 8:11 AM, Guido van Rossum > wrote: > >> OK, then PEP 515

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

2016-05-12 Thread Guido van Rossum
Is anyone going to mark the PEP as accepted? On Thu, May 12, 2016 at 8:11 AM, Guido van Rossum wrote: > OK, then PEP 515 is now officially accepted! Congratulations. Start the > implementation work! > > --Guido (mobile) > On May 11, 2016 10:33 PM, "Georg Brandl"

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

2016-05-12 Thread Guido van Rossum
OK, then PEP 515 is now officially accepted! Congratulations. Start the implementation work! --Guido (mobile) On May 11, 2016 10:33 PM, "Georg Brandl" wrote: I'm happy with the latest version. Georg On 05/11/2016 06:46 PM, Guido van Rossum wrote: > If the authors are happy

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

2016-05-11 Thread Georg Brandl
I'm happy with the latest version. Georg On 05/11/2016 06:46 PM, Guido van Rossum wrote: > If the authors are happy I'll accept it right away. > > (I vaguely recall there's another PEP that's ready for pronouncement -- but > which one?) > > On Wed, May 11, 2016 at 9:34 AM, Brett Cannon

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

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 10:49 Guido van Rossum wrote: > On Wed, May 11, 2016 at 10:28 AM, Brett Cannon wrote: > >> >> >> On Wed, 11 May 2016 at 09:47 Guido van Rossum wrote: >> >>> If the authors are happy I'll accept it right away. >>> >>>

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

2016-05-11 Thread Guido van Rossum
On Wed, May 11, 2016 at 10:28 AM, Brett Cannon wrote: > > > On Wed, 11 May 2016 at 09:47 Guido van Rossum wrote: > >> If the authors are happy I'll accept it right away. >> >> (I vaguely recall there's another PEP that's ready for pronouncement -- >> but

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

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 09:47 Guido van Rossum wrote: > If the authors are happy I'll accept it right away. > > (I vaguely recall there's another PEP that's ready for pronouncement -- > but which one?) > PEP 509 is the only one I can think of. -Brett > > On Wed, May 11, 2016

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

2016-05-11 Thread Guido van Rossum
If the authors are happy I'll accept it right away. (I vaguely recall there's another PEP that's ready for pronouncement -- but which one?) On Wed, May 11, 2016 at 9:34 AM, Brett Cannon wrote: > Is there anything holding up PEP 515 at this point in terms of acceptance > or

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

2016-05-11 Thread Brett Cannon
Is there anything holding up PEP 515 at this point in terms of acceptance or implementation? On Sat, 19 Mar 2016 at 11:56 Guido van Rossum wrote: > All that sounds fine! > > On Sat, Mar 19, 2016 at 11:28 AM, Stefan Krah wrote: > > Guido van Rossum

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

2016-03-19 Thread Guido van Rossum
All that sounds fine! On Sat, Mar 19, 2016 at 11:28 AM, Stefan Krah wrote: > Guido van Rossum python.org> writes: >> So should the preprocessing step just be s.replace('_', ''), or should >> it reject underscores that don't follow the rules from the PEP >> (perhaps

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

2016-03-19 Thread Stefan Krah
Guido van Rossum python.org> writes: > So should the preprocessing step just be s.replace('_', ''), or should > it reject underscores that don't follow the rules from the PEP > (perhaps augmented so they follow the spirit of the PEP and the letter > of the IBM spec)? > > Honestly I think it's

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

2016-03-19 Thread Guido van Rossum
So should the preprocessing step just be s.replace('_', ''), or should it reject underscores that don't follow the rules from the PEP (perhaps augmented so they follow the spirit of the PEP and the letter of the IBM spec)? Honestly I think it's also fine if specifying this exactly is left out of

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

2016-03-19 Thread Stefan Krah
Guido van Rossum python.org> writes: > I don't care too much either way, but I think passing underscores to the constructor shouldn't be affected by the context -- the underscores are just removed before parsing the number. But if it's too complicated to implement I'm fine with punting. Just

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

2016-03-19 Thread Guido van Rossum
I don't care too much either way, but I think passing underscores to the constructor shouldn't be affected by the context -- the underscores are just removed before parsing the number. But if it's too complicated to implement I'm fine with punting. --Guido (mobile) On Mar 19, 2016 6:24 AM, "Nick

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

2016-03-19 Thread Nick Coghlan
On 19 March 2016 at 16:44, Georg Brandl wrote: > On the other hand, assuming decimal literals are introduced at some > point, they would almost definitely need to support underscores. > Of course, the decision whether to modify the Decimal constructor > can be postponed until

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

2016-03-19 Thread Brett Cannon
Where did this PEP leave off? Anything blocking its acceptance? On Sat, 13 Feb 2016 at 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

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

2016-03-19 Thread Georg Brandl
I'll update the text so that the format() gets promoted from optional to specified. There was one point of discussion in the tracker issue that should be resolved before acceptance: the Decimal constructor is listed as getting updated to allow underscores, but its syntax is specified in the

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

2016-03-18 Thread Guido van Rossum
I'm happy to accept this PEP as is stands, assuming the authors are ready for this news. I recommend also implementing the option from footnote [11] (extend the number-to-string formatting language to allow ``_`` as a thousans separator). On Thu, Mar 17, 2016 at 11:19 AM, Brett Cannon

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

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.