Armin Rigo added the comment:

Sorry!  It should be repr(a) inside the print.  Here is the fixed version:

    class X(Decimal):
        def __init__(self, a):
            print('__init__:', repr(a))
    X.from_float(42.5)   # __init__: Decimal('42.5')

    X.from_float(42)     # with _pydecimal: __init__: 42
                         # with _decimal:   __init__: Decimal('42')

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29534>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to