classification
Title: '#' has no effect with 'c' type
Type: behavior Stage: patch review
Components: Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.smith Nosy List: benjamin.peterson, christian.heimes, eric.smith, python-dev, torsten
Priority: normal Keywords: patch

Created on 2010-06-06 23:07 by benjamin.peterson, last changed 2014-04-16 02:38 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
issue_8931.diff torsten, 2011-12-10 21:23 review
Messages (6)
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.
msg192365 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-05 22:13
I'm moving the patch to Python 3.4. 2.7 to 3.3 are out of scope as the change might break software.
msg216279 - (view) Author: Roundup Robot (python-dev) Date: 2014-04-15 07:05
New changeset 16efa8d27e4c by Eric V. Smith in branch '3.4':
Closed issue #8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
http://hg.python.org/cpython/rev/16efa8d27e4c
msg216421 - (view) Author: Roundup Robot (python-dev) Date: 2014-04-16 02:38
New changeset b1aba042b36c by Eric V. Smith in branch 'default':
Close issue #8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
http://hg.python.org/cpython/rev/b1aba042b36c
History
Date User Action Args
2014-04-16 02:38:06python-devsetmessages: + msg216421
2014-04-15 07:05:48eric.smithsetstatus: open -> closed
resolution: fixed
2014-04-15 07:05:14python-devsetnosy: + python-dev
messages: + msg216279
2014-04-14 22:48:30mark.dickinsonsettitle: '#' has no affect with 'c' type -> '#' has no effect with 'c' type
2014-04-14 22:01:41eric.smithsetversions: + Python 3.5, - Python 3.4
2013-07-05 22:13:17christian.heimessetversions: + Python 3.4, - Python 2.6, Python 3.1, Python 2.7, Python 3.2
nosy: + christian.heimes

messages: + msg192365

stage: patch review
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