homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyUnicode_FromFormat broken and not documented for 2.x
Type: crash Stage: resolved
Components: Documentation, Interpreter Core, Unicode Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A
View: 7330
Assigned To: lemburg Nosy List: BreamoreBoy, belopolsky, ezio.melotti, georg.brandl, lemburg, ronaldoussoren, vstinner, ysj.ray
Priority: normal Keywords:

Created on 2009年12月24日 11:54 by ronaldoussoren, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (5)
msg96853 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009年12月24日 11:54
Include/unicodeobject.h includes prototypes for PyUnicode_FromFormat and 
PyUnicode_FromFormatV in both 2.6 and 2.7, but those functions are not 
included in the documention.
And worse, the implementation contains bugs: the %R format code tries to 
include the repr() of an object and blindly assumes that the result of 
PyObject_Repr is a unicode string. In the 2.x tree PyObject_Repr usually 
(but not allways) returns a regular string (str instead of unicode).
The same problem is present in the implementation of %S.
For the %U and %V formats the code does typechecking in an assert 
statement rather than always testing and bailing out using a NULL result 
from the function.
msg112993 - (view) Author: ysj.ray (ysj.ray) Date: 2010年08月05日 16:14
It seems there is pretty much problems in PyUnicode_FromFormatV().
see issue7330.
msg127685 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011年02月01日 05:30
Documentation part of this issue will be addressed in #10435.
msg228004 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014年09月30日 21:29
With Stage "resolved" and Resolution "duplicate" surely this can be closed?
msg228013 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014年09月30日 22:15
Ok, let's close the issue.
History
Date User Action Args
2022年04月11日 14:56:55adminsetgithub: 51823
2014年09月30日 22:15:25vstinnersetstatus: open -> closed
nosy: + vstinner
messages: + msg228013

2014年09月30日 21:29:42BreamoreBoysetnosy: + BreamoreBoy
messages: + msg228004
2011年02月01日 05:30:07belopolskysetnosy: + belopolsky
messages: + msg127685
resolution: duplicate

superseder: PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A
stage: needs patch -> resolved
2010年08月05日 16:14:49ysj.raysetnosy: + ysj.ray
messages: + msg112993
2010年08月04日 21:38:05BreamoreBoysetassignee: georg.brandl -> lemburg

nosy: + lemburg
2009年12月30日 23:20:18alexandre.vassalottilinkissue7608 superseder
2009年12月25日 02:28:22ezio.melottisetpriority: normal
nosy: + ezio.melotti
components: + Unicode
2009年12月24日 11:54:39ronaldoussorencreate

AltStyle によって変換されたページ (->オリジナル) /