Mark Dickinson
8cd1c7681d
Issue #16402 : In range slicing, fix shadowing of exceptions from __index__ method.
2012-11-04 11:46:17 +00:00
Chris Jerdonek
83fe2e1c22
Issue #14783 : Improve int() docstring and also str(), range(), and slice().
...
This commit rewrites the docstring for int() to incorporate the documentation
changes made in issue #16036 . It also switches the docstrings for int(),
str(), range(), and slice() to use multi-line signatures.
2012-10-07 14:48:36 -07:00
Antoine Pitrou
a103b96a80
Issue #14829 : Fix bisect and range() indexing with large indices (>= 2 ** 32) under 64-bit Windows.
2012-05-16 14:37:54 +02:00
Ezio Melotti
982ef4e0bc
#11845 : Fix typo in rangeobject.c that caused a crash in compute_slice_indices. Patch by Daniel Urban.
2011-04-15 08:15:40 +03:00
Matthias Klose
616667fbe8
rangeobject.c (compute_slice_indices): Make function static.
2011-01-16 20:57:01 +00:00
Benjamin Peterson
547d4859b9
plug reference leak
2011-01-13 04:22:54 +00:00
Nick Coghlan
e993b10041
Issue 10889: Support slicing and indexing of large ranges (no docs changes, since, as far as I know, we never said anywhere that this *didn't* work)
2011-01-12 03:15:52 +00:00
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
2010-12-03 20:14:31 +00:00
Nick Coghlan
37ee850b10
Issue 2690: Add support for slicing and negative indices to range objects (includes precalculation and storage of the range length).
...
Refer to the tracker issue for the language moratorium implications of this change
2010-12-03 14:26:13 +00:00
Benjamin Peterson
a1864f3717
pep 7 actually wants the brace on a new line
2010-11-20 23:05:39 +00:00
Benjamin Peterson
155614b104
code style and simplification
2010-11-20 22:44:32 +00:00
Georg Brandl
7e5343b882
Add error handling in range_count.
2010-11-20 22:40:10 +00:00
Benjamin Peterson
0b458d52f9
count() should return integers #10474
2010-11-20 22:35:41 +00:00
Daniel Stutzbach
9f0cbf1c72
Issue #9213 : Add index and count methods to range objects, needed to
...
meet the API of the collections.Sequence ABC.
2010-09-13 21:16:29 +00:00
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00
Benjamin Peterson
36fbb730a7
fix one visible and several possible refleaks in rangeobject.c
...
In some cases, the code was just reordered to allow for less decrefing.
2009-11-16 00:34:25 +00:00
Mark Dickinson
b43dbc26f9
Fix another case of potential signed overflow.
2009-11-15 12:56:08 +00:00
Mark Dickinson
bde0508d75
r76292 commit accidentally committed some extra code; remove it
2009-11-15 10:04:50 +00:00
Mark Dickinson
d550c9a281
Issue #7298 : Fix a variety of problems leading to wrong results with
...
the fast versions of range.__reversed__ and range iteration. Also
fix wrong results and a refleak for PyLong version of range.__reversed__.
Thanks Eric Smith for reviewing, and for suggesting improved tests.
2009-11-15 09:57:26 +00:00
Mark Dickinson
418f81d9b6
Issue #1766304 : The range.__contains__ optimization should only be
...
applied to ints, not to instances of subclasses of int.
2009-09-24 20:04:23 +00:00
Mark Dickinson
3e124ae739
Issue #1766304 : Optimize membership testing for ranges: 'n in range(...)'
...
does an O(1) check, if n is an integer. Non-integers aren't affected.
Thanks Robert Lehmann.
2009-09-22 21:47:24 +00:00
Georg Brandl
c9a5a0e165
#6814 : remove traces of xrange().
2009-09-01 07:34:27 +00:00
Mark Dickinson
732166df68
Fix description of range_length_obj
2009-06-28 22:08:40 +00:00
Benjamin Peterson
12792092a6
this is also no longer true
2009-06-24 22:16:41 +00:00
Benjamin Peterson
a47af9cf18
fix comment
2009-06-24 21:14:38 +00:00