Facundo Batista [EMAIL PROTECTED] added the comment:
Commited in r65220.
Thank you everybody!!
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2417
Changes by Antoine Pitrou [EMAIL PROTECTED]:
--
nosy: +pitrou
priority: - normal
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2417
___
___
Facundo Batista [EMAIL PROTECTED] added the comment:
Alexander, tried the issue2417a.diff patch against 65210, and does not
apply cleanly, could you please submit an updated one?
Thanks!
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2417
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
It looks like e-mail submission did not work. Uploading updated patch as
issue2417b.diff .
Added file: http://bugs.python.org/file10962/issue2417b.diff
___
Python tracker [EMAIL PROTECTED]
Changes by Duncan Booth [EMAIL PROTECTED]:
--
nosy: +duncanb
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2417
__
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
I agree this is a bug. Here is a related problem:
1 is divmod(1,1)[0]
False
--
nosy: +belopolsky
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2417
__
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
int('1') is 1
False
1 is int('0b1', 2)
False
1 is 0b1 4
False
there are probably more ...
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2417
__
Facundo Batista [EMAIL PROTECTED] added the comment:
I really don't understand *why* it's a bug.
Is anywhere in the Language Reference that says that 1 should be the
same object that another 1?
Or do you mean that they *should* be the same object for speed and/or
memory reasons? In this
Adam Olsen [EMAIL PROTECTED] added the comment:
The original bug is not whether or not python reuses int objects, but
rather that an existing optimization disappears under certain
circumstances. Something is breaking our optimization.
The later cases where the optimization is simply gone in
Terry J. Reedy [EMAIL PROTECTED] added the comment:
I agree that this is not a bug in the strict sense. I could have
selected Type: resource usage (for memory increase). But the change of
behavior is also visible. I suspect the change is not intentional both
because of the pattern and because
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
Attached patch fixes the cases discovered so far. It is possible that
in some of these cases creation of the long object that is later
discarded can be avoided by detecting small int return early, but such
optimizations should
Adam Olsen [EMAIL PROTECTED] added the comment:
Unless someone has a legitimate use case for disabling small_int that
doesn't involve debugging (which I really doubt), I'd just assume it's
always in use.
__
Tracker [EMAIL PROTECTED]
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
Attached (issue2417a.diff) patch adds unit tests and fixes a few corner
cases when a non-preallocated 0 was returned to python.
Added file: http://bugs.python.org/file9785/issue2417a.diff
__
Tracker
Changes by Terry J. Reedy [EMAIL PROTECTED]:
--
title: Integer floor division (//): small int check omitted - [py3k] Integer
floor division (//): small int check omitted
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2417
14 matches
Mail list logo