[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-07-24 Thread Facundo Batista
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

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-07-23 Thread Antoine Pitrou
Changes by Antoine Pitrou [EMAIL PROTECTED]: -- nosy: +pitrou priority: - normal ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2417 ___ ___

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-07-23 Thread Facundo Batista
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

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-07-23 Thread Alexander Belopolsky
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]

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Duncan Booth
Changes by Duncan Booth [EMAIL PROTECTED]: -- nosy: +duncanb __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2417 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Alexander Belopolsky
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 __

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Alexander Belopolsky
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 __

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Facundo Batista
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

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Adam Olsen
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

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Terry J. Reedy
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

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Alexander Belopolsky
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

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Adam Olsen
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]

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Alexander Belopolsky
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

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-18 Thread Terry J. Reedy
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