Antoine Pitrou
a103b96a80
Issue #14829 : Fix bisect and range() indexing with large indices (>= 2 ** 32) under 64-bit Windows.
14 years ago
Antoine Pitrou
a701388de1
Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI.
14 years ago
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
14 years ago
Benjamin Peterson
878ce389a0
add introspection to range objects ( closes #9896 )
Patch by Daniel Urban.
14 years ago
Mark Dickinson
36645681c8
Issue #13201 : equality for range objects is now based on equality of the underlying sequences. Thanks Sven Marnach for the patch.
14 years ago
Ezio Melotti
982ef4e0bc
#11845 : Fix typo in rangeobject.c that caused a crash in compute_slice_indices. Patch by Daniel Urban.
15 years ago
Matthias Klose
616667fbe8
rangeobject.c (compute_slice_indices): Make function static.
15 years ago
Benjamin Peterson
547d4859b9
plug reference leak
15 years ago
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)
15 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
15 years ago
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
15 years ago
Benjamin Peterson
a1864f3717
pep 7 actually wants the brace on a new line
15 years ago
Benjamin Peterson
155614b104
code style and simplification
15 years ago
Georg Brandl
7e5343b882
Add error handling in range_count.
15 years ago
Benjamin Peterson
0b458d52f9
count() should return integers #10474
15 years ago
Daniel Stutzbach
9f0cbf1c72
Issue #9213 : Add index and count methods to range objects, needed to
meet the API of the collections.Sequence ABC.
16 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
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.
........
................
16 years ago
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.
........
16 years ago
Benjamin Peterson
bdf439321f
Merged revisions 76319 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r76319 | benjamin.peterson | 2009-11-15 18:34:25 -0600 (Sun, 15 Nov 2009) | 4 lines
fix one visible and several possible refleaks in rangeobject.c
In some cases, the code was just reordered to allow for less decrefing.
........
16 years ago
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.
16 years ago
Mark Dickinson
d340f6cd3f
Merged revisions 76298 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r76298 | mark.dickinson | 2009-11-15 12:56:08 +0000 (Sun, 15 Nov 2009) | 1 line
Fix another case of potential signed overflow.
........
16 years ago
Mark Dickinson
b43dbc26f9
Fix another case of potential signed overflow.
16 years ago
Mark Dickinson
b6447512ab
Merged revisions 76292-76293 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r76292 | mark.dickinson | 2009-11-15 09:57:26 +0000 (Sun, 15 Nov 2009) | 6 lines
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.
........
r76293 | mark.dickinson | 2009-11-15 10:04:50 +0000 (Sun, 15 Nov 2009) | 1 line
r76292 commit accidentally committed some extra code; remove it
........
16 years ago
Mark Dickinson
bde0508d75
r76292 commit accidentally committed some extra code; remove it
16 years ago
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.
16 years ago
Mark Dickinson
418f81d9b6
Issue #1766304 : The range.__contains__ optimization should only be
applied to ints, not to instances of subclasses of int.
17 years ago
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.
17 years ago
Georg Brandl
7baf625bab
Merged revisions 74613,74615,74619-74620,74622 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
................
r74613 | georg.brandl | 2009-09-01 09:34:27 +0200 (Di, 01 Sep 2009) | 1 line
#6814 : remove traces of xrange().
................
r74615 | georg.brandl | 2009-09-01 09:42:40 +0200 (Di, 01 Sep 2009) | 9 lines
Recorded merge of revisions 74614 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74614 | georg.brandl | 2009-09-01 09:40:54 +0200 (Di, 01 Sep 2009) | 1 line
#6813 : better documentation for numberless string formats.
........
................
r74619 | georg.brandl | 2009-09-01 10:02:03 +0200 (Di, 01 Sep 2009) | 1 line
#6754 : remove old struct member nb_inplace_divide.
................
r74620 | georg.brandl | 2009-09-01 10:03:26 +0200 (Di, 01 Sep 2009) | 1 line
#6732 : fix return value of module init function in example.
................
r74622 | georg.brandl | 2009-09-01 10:11:14 +0200 (Di, 01 Sep 2009) | 73 lines
Merged revisions 74542,74544-74548,74550,74554-74555,74578,74588,74590,74603,74616-74618,74621 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74542 | georg.brandl | 2009-08-23 23:28:56 +0200 (So, 23 Aug 2009) | 1 line
Restore alphabetic order.
........
r74544 | georg.brandl | 2009-08-24 19:12:30 +0200 (Mo, 24 Aug 2009) | 1 line
#6775 : fix python.org URLs in README.
........
r74545 | georg.brandl | 2009-08-24 19:14:29 +0200 (Mo, 24 Aug 2009) | 1 line
#6772 : mention utf-8 as utf8 alias.
........
r74546 | georg.brandl | 2009-08-24 19:20:40 +0200 (Mo, 24 Aug 2009) | 1 line
#6725 : spell "namespace" consistently.
........
r74547 | georg.brandl | 2009-08-24 19:22:05 +0200 (Mo, 24 Aug 2009) | 1 line
#6718 : fix example.
........
r74548 | georg.brandl | 2009-08-24 19:24:27 +0200 (Mo, 24 Aug 2009) | 1 line
#6677 : mention "deleting" as an alias for removing files.
........
r74550 | georg.brandl | 2009-08-24 19:48:40 +0200 (Mo, 24 Aug 2009) | 1 line
#6677 : note that rmdir only removes empty directories.
........
r74554 | georg.brandl | 2009-08-27 20:59:02 +0200 (Do, 27 Aug 2009) | 1 line
Typo fix.
........
r74555 | georg.brandl | 2009-08-27 21:02:43 +0200 (Do, 27 Aug 2009) | 1 line
#6787 : reference fix.
........
r74578 | tarek.ziade | 2009-08-29 15:33:21 +0200 (Sa, 29 Aug 2009) | 1 line
fixed #6801 : symmetric_difference_update also accepts pipe
........
r74588 | georg.brandl | 2009-08-30 10:35:01 +0200 (So, 30 Aug 2009) | 1 line
#6803 : fix old name.
........
r74590 | georg.brandl | 2009-08-30 13:51:53 +0200 (So, 30 Aug 2009) | 1 line
#6801 : fix copy-paste oversight.
........
r74603 | georg.brandl | 2009-08-31 08:38:29 +0200 (Mo, 31 Aug 2009) | 1 line
other -> others where multiple arguments are accepted.
........
r74616 | georg.brandl | 2009-09-01 09:46:26 +0200 (Di, 01 Sep 2009) | 1 line
#6808 : clarification.
........
r74617 | georg.brandl | 2009-09-01 09:53:37 +0200 (Di, 01 Sep 2009) | 1 line
#6765 : hint that log(x, base) is not very sophisticated.
........
r74618 | georg.brandl | 2009-09-01 10:00:47 +0200 (Di, 01 Sep 2009) | 1 line
#6810 : add a link to the section about frame objects instead of just a description where to find it.
........
r74621 | georg.brandl | 2009-09-01 10:06:03 +0200 (Di, 01 Sep 2009) | 1 line
#6638 : fix wrong parameter name and markup a class.
........
................
17 years ago
Georg Brandl
c9a5a0e165
#6814 : remove traces of xrange().
17 years ago
Georg Brandl
7d1e88063c
Merged revisions 73656,73658,73663,73666 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r73656 | mark.dickinson | 2009-06-29 00:08:40 +0200 (Mo, 29 Jun 2009) | 1 line
Fix description of range_length_obj
........
r73658 | raymond.hettinger | 2009-06-29 00:30:13 +0200 (Mo, 29 Jun 2009) | 1 line
Small doc fix-ups to floatingpoint.rst. More are forthcoming.
........
r73663 | raymond.hettinger | 2009-06-29 01:21:38 +0200 (Mo, 29 Jun 2009) | 1 line
Clean-up floating point tutorial.
........
r73666 | alexandre.vassalotti | 2009-06-29 03:13:41 +0200 (Mo, 29 Jun 2009) | 2 lines
Make b64encode raises properly a TypeError when altchars is not bytes.
........
17 years ago
Mark Dickinson
732166df68
Fix description of range_length_obj
17 years ago
Benjamin Peterson
12792092a6
this is also no longer true
17 years ago
Benjamin Peterson
a47af9cf18
fix comment
17 years ago
Mark Dickinson
eb36d31bb8
Issue #6334 : Fix buggy internal length calculation in builtin range function
17 years ago
Raymond Hettinger
94f5583777
Fix SystemError and a wasps nest of ref counting issues.
17 years ago
Mark Dickinson
e94c679df0
Issue #1717 : rename tp_compare to tp_reserved. I'll change the
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
17 years ago
Mark Dickinson
211c625829
Issue #1717 , stage 2: remove uses of tp_compare in Modules and most
Objects.
17 years ago
Alexandre Vassalotti
7505607ae7
Issue 2582: Fix pickling of range objects.
18 years ago
Benjamin Peterson
df0a5cbb2c
#2689 Fix indentation in Objects/rangeobject.c
18 years ago
Raymond Hettinger
ad3f3321f6
Merge r60673
18 years ago
Martin v. Löwis
8445104d7d
Drop _PyLong_FitsInLong. Fixes #1666 .
18 years ago
Christian Heimes
217cfd1c86
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
18 years ago
Christian Heimes
a22e8bdfd9
Added all PyTypeObjects to the appropriate header files.
Before the patch a lot of internal types weren't available in the header files. The patch exposes the new iterators, views and some other types to all C modules. I've also renamed some of the types and tp_names.
18 years ago
Christian Heimes
f83be4e3f3
Added view and iterator types to collections / _abcoll
I've also renamed several of the iterators to keep a consistent naming schema.
18 years ago
Amaury Forgeot d'Arc
b7f17e4bb4
Found another memory leak in longrangeiter. And redo the previous correction
without calling PyType_Ready().
Question 1: Should the interpreter register all types with PyType_Ready()?
Many types seem to avoid it.
Question 2: To reproduce the problem, run the following code:
def f():
while True:
for a in iter(range(0,1,10**20)):
pass
f()
And watch the memory used by the process.
How do we test this in a unittest?
18 years ago
Amaury Forgeot d'Arc
a1e9ec4e55
Correct a memory leak: the range() object was not properly freed.
18 years ago
Martin v. Löwis
9f2e346911
Merged revisions 56467-56482 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
................
r56477 | martin.v.loewis | 2007-07-21 09:04:38 +0200 (Sa, 21 Jul 2007) | 11 lines
Merged revisions 56466-56476 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r56476 | martin.v.loewis | 2007-07-21 08:55:02 +0200 (Sa, 21 Jul 2007) | 4 lines
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
........
................
r56478 | martin.v.loewis | 2007-07-21 09:47:23 +0200 (Sa, 21 Jul 2007) | 2 lines
PEP 3123: Use proper C inheritance for PyObject.
................
r56479 | martin.v.loewis | 2007-07-21 10:06:55 +0200 (Sa, 21 Jul 2007) | 3 lines
Add longintrepr.h to Python.h, so that the compiler can
see that PyFalse is really some kind of PyObject*.
................
r56480 | martin.v.loewis | 2007-07-21 10:47:18 +0200 (Sa, 21 Jul 2007) | 2 lines
Qualify SHIFT, MASK, BASE.
................
r56482 | martin.v.loewis | 2007-07-21 19:10:57 +0200 (Sa, 21 Jul 2007) | 2 lines
Correctly refer to _ob_next.
................
19 years ago
Walter Dörwald
4ad94210d1
Rename test_xrange.py to test_range.py and fix the
type name in various spots.
19 years ago
Walter Dörwald
03b43d8a77
repr(range(10)) now returns 'range(0, 10)' for clarity.
19 years ago
Walter Dörwald
850e516ebc
Change range_repr() to use %R for the start/stop/step attributes.
19 years ago