Message287615
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') |
|
Date |
User |
Action |
Args |
2017-02-11 18:06:29 | arigo | set | recipients:
+ arigo, rhettinger, mark.dickinson, skrah |
2017-02-11 18:06:29 | arigo | set | messageid: <1486836389.87.0.17507772846.issue29534@psf.upfronthosting.co.za> |
2017-02-11 18:06:29 | arigo | link | issue29534 messages |
2017-02-11 18:06:29 | arigo | create | |
|