[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-09 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

FTR the doc for ',' was added in a6e7ed52df9b and fa16acb2ffdd.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13718
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-09 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

[[fill]align][sign][#][0][width][,][.precision][type]

The ',' must be before [.precision]:

 '{:,.2%}'.format(55.537568)
'5,553.76%'


In my opinion this is not a bug.

--
nosy: +skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13718
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-09 Thread Eric V. Smith

Eric V. Smith e...@trueblade.com added the comment:

Good point. I hadn't looked at the string closely enough. Closing.

--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13718
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-06 Thread Michael Kesper

New submission from Michael Kesper mkes...@schokokeks.org:

http://docs.python.org/library/string.html#format-specification-mini-language 
mentions:
Changed in version 2.7: Added the ',' option (see also PEP 378).

PEP 378 tells me:
The ',' option is defined as shown above for types 'd', 'e', 'f', 'g', 'E', 
'G', '%', 'F' and ''.

However:

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type help, copyright, credits or license for more information.
 '{:.2,%}'.format(.537568)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: Invalid conversion specification
 '{:2,%}'.format(.537568)
'53.756800%'

--
messages: 150721
nosy: mkesper
priority: normal
severity: normal
status: open
title: Format Specification Mini-Language does not accept comma for percent 
value
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13718
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +eric.smith, ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13718
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-06 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


--
assignee:  - eric.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13718
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com