�
,1�]c @ sZ d Z d d l m Z m Z m Z d d l m Z m Z d d � Z d � Z
d g Z d S( sD
``python-future``: pure Python implementation of Python 3 round().
i����( t PYPYt PY26t bind_method( t Decimalt ROUND_HALF_EVENc C s t } | d k r! t } d } n t | d � r= | j | � S| d k rX t d � � n t d � | } t r� d t t | � � k r� t
| � } q� n t | t � r� | } nB t s� t j
| � j | d t �} n t | � j | d t �} | rt | � St
| � Sd S( s�
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.
i t __round__s"