[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 35e66eb101da by Martin Panter in branch '3.5': Issue #28916: Correct description of %o and %x alternative forms https://hg.python.org/cpython/rev/35e66eb101da New changeset bc7fc85beed1 by Martin Panter in branch '3.6': Issues #28916, #26483: Merge

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both patches LGTM. -- assignee: docs@python -> martin.panter nosy: +serhiy.storchaka stage: patch review -> commit review ___ Python tracker

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-09 Thread Martin Panter
Martin Panter added the comment: Patch for %x in Py 2. -- Added file: http://bugs.python.org/file45828/alt-zero.py2.patch ___ Python tracker ___

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-09 Thread Martin Panter
Martin Panter added the comment: The documentation for %x etc also had the same problem, and it applies to Python 2 for %x. Here is a patch for Python 3. The behaviour is already tested, but there were some quirks due to porting from Py 2 tests, and duplicate tests which I removed.

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-08 Thread Martin Panter
Martin Panter added the comment: Looks like a leftover relic from Python 2. In Python 3, the prefix is “0o”, not just “0”. This matches to change in Python 2 to 3 octal literal syntax. And there is no special handling of zero in 3: >>> "%#o" % 0 '0o0' -- nosy: +martin.panter stage:

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-08 Thread woo yoo
New submission from woo yoo: Mismatch occurs within the "Notes" section,row 1.Here is the link:https://docs.python.org/3/library/stdtypes.html#old-string-formatting The course of coding shows below: >>>'%#07o' % 1223 Result value is '0o02307',which is not in line with the description.