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.

Author PeterTom
Recipients PeterTom
Date 2016-08-03.11:18:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470223123.65.0.568086751938.issue27672@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 3.4.4 (64-bit) and in many previous versions it worked like this:

>>> "%02x" % 12.99
'0c'

Now in Python 3.5.2 (64-bit) it shows an error:
>>> "%02x" % 12.99
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    "%02x" % 12.99
TypeError: %x format: an integer is required, not float

This problem broke some of my code which uses turtle.py (which is part of the cpython distribution), but I can see similar problems also in some third party code (e.g. I can see it in canvasvg3.py).
So I kindly ask for returning the 3.4-like interpretation of the x format (and o format and maybe also other formats).
History
Date User Action Args
2016-08-03 11:18:43PeterTomsetrecipients: + PeterTom
2016-08-03 11:18:43PeterTomsetmessageid: <1470223123.65.0.568086751938.issue27672@psf.upfronthosting.co.za>
2016-08-03 11:18:43PeterTomlinkissue27672 messages
2016-08-03 11:18:43PeterTomcreate