[issue1533] Bug in range() function for large values
Alexander Belopolsky
report at bugs.python.org
Tue May 4 14:41:28 CEST 2010
Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:
I see. Let me take a look.
BTW, I tried to use tabs for indentation in the patch, but emacs was
not always happy about it. Is there some c-mode setting that I don't
know about that would take care of that?
On May 4, 2010, at 8:34 AM, Mark Dickinson <report at bugs.python.org>
wrote:
>
> Mark Dickinson <dickinsm at gmail.com> added the comment:
>
> Hi Alexander,
>
> I took the liberty of messing with your patch slightly; I didn't
> want to ask you to make further changes since the patch was fine,
> and my messing was mostly just to satisfy my own fussiness (only the
> first two items were really necessary):
>
> Minor updates:
> - add Misc/NEWS entry
> - remove trailing whitespace and fix spaces that should have been a
> tab
> - added some extra tests to check all possible combinations of bad
> arguments, purely to check for refcounting problems
> - initialize low to NULL, to match the Py_XDECREF(low) (could change
> that Py_XDECREF to Py_DECREF instead, but the code's more resistant
> to random refactorings this way --- see next item :)
> - randomly refactor: regroup blocks for ease of reading
> - don't do PyLong_FromLong(1) until it's needed ('zero' is different,
> since it's always used in the non-error case)
> - [micro-optimization]: don't pass a known zero value to
> get_range_long_argument
>
> Any objections or comments? Can I apply this version of the patch?
>
> ----------
> Added file: http://bugs.python.org/file17200/issue1533_metd.diff
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue1533>
> _______________________________________
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1533>
_______________________________________
More information about the Python-bugs-list
mailing list