classification
Title: '#' has no affect with 'c' type
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.2, Python 3.1, Python 2.7, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: eric.smith Nosy List: benjamin.peterson, eric.smith, torsten
Priority: normal Keywords: patch

Created on 2010-06-06 23:07 by benjamin.peterson, last changed 2011-12-10 21:23 by torsten.

Files
File name Uploaded Description Edit
issue_8931.diff torsten, 2011-12-10 21:23 review
Messages (3)
msg107250 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-06-06 23:07
$ python3
Python 3.1.2 (release31-maint, May  3 2010, 22:18:46)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> format(ord("a"), "c")
'a'
>>> format(ord("a"), "#c")
'a'

I wonder if '#' with 'c' should raise an exception.
msg107255 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-06-07 00:21
I think that every type that # does not apply to should raise an exception.
msg149191 - (view) Author: Torsten Landschoff (torsten) Date: 2011-12-10 21:23
Attached patch makes Python throw an exception in the case above.
It also adds a test case for that case.
History
Date User Action Args
2011-12-10 21:23:21torstensetfiles: + issue_8931.diff

nosy: + torsten
messages: + msg149191

keywords: + patch
2010-06-07 00:21:16eric.smithsetmessages: + msg107255
2010-06-06 23:07:14benjamin.petersoncreate