Serhiy Storchaka
bb86bf4c4e
bpo-35444: Unify and optimize the helper for getting a builtin object. (GH-11047)
This speeds up pickling of some iterators.
This fixes also error handling in pickling methods when fail to
look up builtin "getattr".
7 years ago
Zackery Spytz
c9a6168924
Fix a possible crash in range.__reversed__(). (GH-10252)
7 years ago
Alexey Izbyshev
7ecae3ca0b
closes bpo-34468: Objects/rangeobject.c: Fix an always-false condition in range_repr() (GH-8880)
Also, propagate the error from PyNumber_AsSsize_t() because we don't care
only about OverflowError which is not reported if the second argument is NULL.
Reported by Svace static analyzer.
7 years ago
Siddhesh Poyarekar
55edd0c185
bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030)
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments. This triggers an
invalid function cast warning in gcc8 due to the argument mismatch.
Fix this by adding a dummy unused argument.
8 years ago
Serhiy Storchaka
6cca5c8459
bpo-30592: Fixed error messages for some builtins. ( #1996 )
Error messages when pass keyword arguments to some builtins that
don't support keyword arguments contained double parenthesis: "()()".
The regression was introduced by bpo-30534.
9 years ago
Serhiy Storchaka
ba85d69a3e
bpo-29878: Add global instances of int for 0 and 1. ( #852 )
9 years ago
4kir4
e46fb86118
bpo-28876: bool of large range raises OverflowError ( #699 )
9 years ago
Serhiy Storchaka
df53392f0d
Issue #28376 : Creating instances of range_iterator by calling range_iterator
type now is disallowed. Calling iter() on range instance is the only way.
Patch by Oren Milman.
9 years ago
Serhiy Storchaka
c7f490c8b1
Issue #28376 : Creating instances of range_iterator by calling range_iterator
type now is deprecated. Patch by Oren Milman.
9 years ago
Serhiy Storchaka
44759bcf13
Issue #28376 : The constructor of range_iterator now checks that step is not 0.
Patch by Oren Milman.
9 years ago
Berker Peksag
ed6224ee0c
Issue #28045 : Fix comment in range_contains_long()
Patch by wim glenn.
9 years ago
Benjamin Peterson
af580dff4a
replace PY_LONG_LONG with long long
9 years ago
Serhiy Storchaka
5d062d7ba3
Issue #27333 : Simplified testing step on 0.
10 years ago
Serhiy Storchaka
cfdfbb4d3c
Issue #27342 : Replaced some Py_XDECREFs with Py_DECREFs.
Patch by Xiang Zhang.
10 years ago
Serhiy Storchaka
6a7b3a77b4
Issue #26778 : Fixed "a/an/and" typos in code comment and documentation.
10 years ago
Serhiy Storchaka
57a01d3a0e
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
10 years ago
Serhiy Storchaka
48842714b9
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
10 years ago
Serhiy Storchaka
4a1e70fc31
Issue #20440 : Applied yet one patch for using Py_SETREF.
The patch is automatically generated, it replaces the code that uses Py_CLEAR.
10 years ago
Serhiy Storchaka
5a57ade58e
Issue #20440 : Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
10 years ago
Serhiy Storchaka
fa494fd883
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
11 years ago
Benjamin Peterson
ac22c6b923
improved range docstring ( closes #22785 )
Patch by Ned Batchelder.
11 years ago
Serhiy Storchaka
009b811d67
Removed unintentional trailing spaces in non-external and non-generated C files.
11 years ago
Benjamin Peterson
bcf8554fd4
remove buzzword ( closes #23210 )
11 years ago
Kristján Valur Jónsson
25dded041f
Make the various iterators' "setstate" sliently and consistently clip the
index. This avoids the possibility of setting an iterator to an invalid
state.
12 years ago
Kristján Valur Jónsson
4ca688edeb
Fix pickling of rangeiter. rangeiter_setstate would not allow setting it
to the exhausted state.
12 years ago
Ezio Melotti
5792ce151c
#19067 : use imperative mood in range object docstrings. Patch by Marco Buttu.
12 years ago
Serhiy Storchaka
9594942716
Issue #18783 : Removed existing mentions of Python long type in docstrings,
error messages and comments.
13 years ago
Mark Dickinson
ffdb2c21b3
Issue #16451 : Refactor to remove duplication between range and slice in slice index computations.
13 years ago
Mark Dickinson
8cd1c7681d
Issue #16402 : In range slicing, fix shadowing of exceptions from __index__ method.
13 years ago
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
13 years ago
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.
13 years ago
Mark Dickinson
218a8ab5eb
Issues #16029 , #16030 : Fix pickling and repr of large xranges.
13 years ago
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