Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
future
/
builtins
/
__pycache__
[ HOME ]
Exec
Submit
newround.cpython-37.pyc
B �A�[ � @ sD d Z ddlmZmZmZ ddlmZmZ d dd�Zdd� Z dgZ dS ) zD ``python-future``: pure Python implementation of Python 3 round(). � )�PYPY�PY26�bind_method)�Decimal�ROUND_HALF_EVENNc C s� d}|dkrd}d}t | d�r(| �|�S |dk r8td��td�| }trbdtt| ��krbt| �} ts|t� | �j |td �}nt| �j |td �}|r�t |�S t|�S dS ) a� See Python 3 documentation: uses Banker's Rounding. Delegates to the __round__ method if for some reason this exists. If not, rounds a number to a given precision in decimal digits (default 0 digits). This returns an int when called with one argument, otherwise the same type as the number. ndigits may be negative. See the test_round method in future/tests/test_builtins.py for examples. FNTr � __round__z"negative ndigits not supported yet�10�numpy)Zrounding)�hasattrr �NotImplementedErrorr r �repr�type�floatr Z from_floatZquantizer � from_float_26�int)�number�ndigitsZ return_int�exponent�d� r �I/opt/alt/python37/lib/python3.7/site-packages/future/builtins/newround.py�newround s&