blob: df8ff79dd17b2583ceec62b67f57f7d6098873c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
.. _future-builtins:
``future.builtins``
===================
The ``future.builtins`` module is also accessible as ``builtins`` on Py2.
- ``pow()`` supports fractional exponents of negative numbers like in Py3::
>>> from builtins import pow
>>> pow(-1, 0.5)
(6.123233995736766e-17+1j)
- ``round()`` uses Banker's Rounding as in Py3 to the nearest even last digit::
>>> from builtins import round
>>> assert round(0.1250, 2) == 0.12
|