[docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers

Terry J. Reedy report at bugs.python.org
Fri Apr 13 19:02:38 CEST 2012

Terry J. Reedy <tjreedy at udel.edu> added the comment:

I checked Standard C by Plauger & Brodie and as I read it, it agrees with py.user and his C compiler. For stdlib strtol() and strtoul(), the 0x/0X prefixes are accepted but optional for explicit base 16. If base is given as 0, they are accepted and set the base to 16 (which is otherwise 10). Except for %i, Xscanf functions apparently call either of the above with an explicit base, which is 16 for the %x specifiers.

keywords: +easy, patch
nosy: +terry.reedy
stage:  -> needs patch
versions: +Python 2.7, Python 3.3

Python tracker <report at bugs.python.org>

More information about the docs mailing list