[issue29568] undefined parsing behavior with the old style string formatting

2017-03-24 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 9f8ad3f39e0a92ed37d012b9dd237399524f0d51 by Xiang Zhang (Serhiy Storchaka) in branch 'master': bpo-29568: Disable any characters between two percents for escaped percent "%%" in the format string for classic string formatting. (GH-513) https://gith

[issue29568] undefined parsing behavior with the old style string formatting

2017-03-17 Thread Larry Hastings
Changes by Larry Hastings : -- pull_requests: -588 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29568] undefined parsing behavior with the old style string formatting

2017-03-17 Thread Larry Hastings
Changes by Larry Hastings : -- pull_requests: +588 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue29568] undefined parsing behavior with the old style string formatting

2017-03-07 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue29568] undefined parsing behavior with the old style string formatting

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +422 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Jerry Dimitrov
Jerry Dimitrov added the comment: Thanks for the documentation reference. Can we at least add this link reference [1] as a note or something like that into those documentation sections: [2] https://docs.python.org/2/library/stdtypes.html#string-formatting and [3] https://docs.python.org/3/lib

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch stage: -> patch review versions: -Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file46640/format-percent.patch ___ Python tracker

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: Or even not fix it in develop branch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: The documentation[1] explicitly states using % to do string format could be error-prone and recommends using str.format(). So +1 on no change in maintenance branches. [1] https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting --

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is what I want. Current behavior is just an artefact of the implementation. I have doubts that any other implementation of printf-like formatting has such behavior. Bytes formatting starves from the same issue. >>> b'% %' % {} b'%' But there are di

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread R. David Murray
R. David Murray added the comment: I don't think we should change the behavior in maintenance branches. I take it what you want to do is make it so that if the parser ends up thinking it is seeing '%%' but there is stuff between the two %s, that's an error? -- nosy: +r.david.murray _

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In this example characters between percents are parsed as for any conversion specifier but ignored and '%(a) %' is formatted to '%'. '(a)' specifies a mapping key, ' ' is a conversion flag, the second '%' is a conversion type. >>> '%(a) d' % {'a': 123} ' 123

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Jerry Dimitrov
New submission from Jerry Dimitrov: Hello everyone, This is my first bug report to the python project, so please excuse me if the metadata for this particular issue is not 100% accurate. Today I noticed (with the help from couple of people in IRC) a strange behavior in the python string format