I recently discovered that the round
function available in future
does not support negative digit rounding, which is incompatible with builtin round
:
>>> from builtins import round
>>> round(4781, -2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/future/builtins/newround.py", line 33, in newround
raise NotImplementedError('negative ndigits not supported yet')
NotImplementedError: negative ndigits not supported yet
This somewhat limits the usefulness of the Python-Future quick-start recommendation:
The easiest way is to start each new module with these lines:
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import *
Then write standard Python 3 code.
I can't find the round
incompatibility documented anywhere, and wonder what other functions or types behave differently or have non-implemented features. What other gotchas are there? Where are these incompatibilities documented?