[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

I also fixed the code so both '_' and ',' can't be specified, and added tests. 
The documentation is also updated.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 99abb731ea7a by Eric V. Smith in branch 'default':
Issue 27080: PEP 515: add '_' formatting option.
https://hg.python.org/cpython/rev/99abb731ea7a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

I just noticed that the patch doesn't handle 'X' (uppercase) correctly, while 
it does handle 'x' (lowercase). I'll fix that when I commit.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

Since Brett is working on the parsing part, I'll work on this. I might take a 
stab at the documentation first, but in any event I'll commit it tonight.

--
assignee:  -> eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-08 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +ned.deily
priority: normal -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-08 Thread Chris Angelico

Chris Angelico added the comment:

Thanks Brett! Sounds like a plan.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-08 Thread Brett Cannon

Brett Cannon added the comment:

Actually, Chris doesn't have commit privileges so I just will. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-08 Thread Brett Cannon

Brett Cannon added the comment:

Latest patch LGTM. If Georg isn't able to get to issue #26331 then I'll commit 
to tomorrow. Do you want me to commit yours on your behalf right after, Chris 
to make sure this hits b1?

--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-09-07 Thread Chris Angelico

Chris Angelico added the comment:

Another couple of tests, per comments.

--
Added file: http://bugs.python.org/file44425/moar-tests.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-08-19 Thread Chris Angelico

Chris Angelico added the comment:

Hmm, strange. Comma formatting never seems to have had tests added. So I've 
added a couple of simple tests of comma formatting at the same time as adding 
underscore formatting tests. Also, test_long.py currently has a comment "# 
octal" preceding a bunch of tests of *binary* formatting, and no tests of 
octal. So I've added those too.

In any case, here's a patch with full functionality and tests.

--
Added file: http://bugs.python.org/file44154/underscores_with_tests.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-08-19 Thread Chris Angelico

Chris Angelico added the comment:

Hmm, adding bin/oct/hex support didn't turn out that hard. Although it feels 
like this code is getting hackish. Definitely needs code review!

--
Added file: http://bugs.python.org/file44153/underscores_all_bases.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-08-19 Thread Chris Angelico

Changes by Chris Angelico :


--
nosy: +Rosuav

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-08-19 Thread Chris Angelico

Chris Angelico added the comment:

Here's a first-cut patch. No docs, no tests, and applies only to decimal 
formatting. It involves redefining the thousands_separators flag from being a 
boolean to being a three-state flag (none, comma, or underscore), and (ab)uses 
LT_*_LOCALE to carry that same information around.

--
keywords: +patch
Added file: http://bugs.python.org/file44152/underscores_decimal_only.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-08-19 Thread Eric V. Smith

Eric V. Smith added the comment:

Unfortunately I'm not going to have time to implement this before 3.6 beta 1, 
so I'm un-assigning it to myself. I'll post to python-dev and hopefully someone 
else can get to it. Apologies for waiting so long.

--
assignee: eric.smith -> 
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-05-21 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27080] Implement the formatting part of PEP 515, '_' in numeric literals.

2016-05-21 Thread Eric V. Smith

New submission from Eric V. Smith:

I've separated this out from issue 26331, so as to not interfere with 
discussions and code reviews for the parsing portion of the PEP.

--
assignee: eric.smith
components: Interpreter Core
messages: 266023
nosy: eric.smith
priority: normal
severity: normal
status: open
title: Implement the formatting part of PEP 515, '_' in numeric literals.
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com