[New-bugs-announce] [issue7278] decimal.py: New instance vs. new reference

Stefan Krah report at bugs.python.org
Sat Nov 7 10:51:28 CET 2009


New submission from Stefan Krah <stefan-usenet at bytereef.org>:

In the following case, Decimal() and int() behave differently. I wonder
if this is intentional:

>>> from decimal import *
>>> x = Decimal(2)
>>> y = Decimal(x)
>>> id(x) == id(y)
False
>>> 
>>> x = int(2)
>>> y = int(x)
>>> id(x) == id(y)
True
>>>

----------
messages: 95015
nosy: mark.dickinson, skrah
severity: normal
status: open
title: decimal.py: New instance vs. new reference

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7278>
_______________________________________


More information about the New-bugs-announce mailing list