[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

Ethan Furman report at bugs.python.org
Sun Dec 29 10:16:30 CET 2013


Ethan Furman added the comment:

Ran full test suite; some errors came up in test_format from the following test lines:

    testformat("%#x", 1.0, "0x1")
    testformat("%x", float(big), "123456_______________", 6)
    testformat("%o", float(big), "123456__________________________", 6)
    testformat("%x", float(0x42), "42")
    testformat("%o", float(0o42), "42")

Removed as float() is not supposed to be valid input.

Also fixed two memory leaks in unicodeobject from my changes, and a float->oct bug in tarfile.

----------
Added file: http://bugs.python.org/file33286/issue19995.stoneleaf.02.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19995>
_______________________________________


More information about the Python-bugs-list mailing list