📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 07:37:53
📂
/ (Root)
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
future
/
builtins
/
__pycache__
📍 /opt/alt/python37/lib/python3.7/site-packages/future/builtins/__pycache__
🔄 Refresh
✏️
Editing: newround.cpython-37.opt-1.pyc
Read Only
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 yetZ10Znumpy)Zrounding)�hasattrr �NotImplementedErrorr r �repr�type�floatr Z from_floatZquantizer � from_float_26�int)ZnumberZndigitsZ return_intZexponent�d� r �I/opt/alt/python37/lib/python3.7/site-packages/future/builtins/newround.py�newround s&