New submission from Peter Tomcsanyi:
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 "", line 1, in
"%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).
--
components: Interpreter Core
messages: 271894
nosy: PeterTom
priority: normal
severity: normal
status: open
title: x fromat of % operator broken in Python 3.5.2
type: behavior
versions: Python 3.5
___
Python tracker
<http://bugs.python.org/issue27672>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com