Raymond Hettinger
f643b9a9c7
Issue 8743: Improve interoperability between sets and the collections.Set abstract base class.
2014-05-25 22:13:41 -07:00
Raymond Hettinger
007684a701
Silence compiler warning for unused declaration.
2013-08-04 22:35:37 -07:00
Benjamin Peterson
e3b5eda8be
remove unused variable
2011-10-30 14:24:44 -04:00
Petri Lehtinen
a39de111a5
Fix the return value of set_discard (issue #10519 )
2011-10-30 14:33:09 +02:00
Petri Lehtinen
5f4d870668
Avoid unnecessary recursive function calls ( closes #10519 )
2011-10-30 13:55:56 +02:00
Éric Araujo
f079c9bfbf
Fix obscure set crashers ( #4420 ). Backport of d56b3cafb1e6, reviewed by Raymond.
2011-03-22 23:47:32 +01:00
Armin Rigo
39e32a7e81
Revert r86726. Sorry about interfering with the rc.
2010-11-24 13:17:48 +00:00
Armin Rigo
442e4477fe
A no-op change. It looks like this call was not meant to be a recursive
...
call, but just call the helper (which the recursive call ends up doing).
2010-11-24 10:39:23 +00:00
Raymond Hettinger
3ad323ecaf
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
2010-08-06 10:18:56 +00:00
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
2010-05-09 14:46:46 +00:00
Raymond Hettinger
35b76027f9
Issue 8436: set.__init__ accepts keyword args
2010-04-18 22:57:57 +00:00
Victor Stinner
17d905449d
Issue #7818 : set().test_c_api() doesn't expect a set('abc'), modify the set.
2010-03-13 00:13:22 +00:00
Georg Brandl
b36e63a5ee
The set types can also be called without arguments.
2010-02-28 18:26:37 +00:00
Georg Brandl
bca1169e94
#8030 : make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object.
2010-02-28 18:19:17 +00:00
Raymond Hettinger
79628d311f
Issue 7263: Fix set.intersection() docstring.
2009-11-18 20:28:22 +00:00
Raymond Hettinger
c2b9e1a134
Issue 6573: Fix set.union() for cases where self is in the argument chain.
2009-07-27 20:32:04 +00:00
Antoine Pitrou
aa687902f2
Issue #3680 : Reference cycles created through a dict, set or deque iterator did not get collected.
2009-01-01 14:11:22 +00:00
Amaury Forgeot d'Arc
d78b9dcbc3
#4069 : aSet.remove(otherSet) would always report the empty frozenset([]) as the missing key.
...
Now it correctly refers to the initial otherset.
Reviewed by Raymond. Will backport to 2.6.
2008-10-07 20:32:10 +00:00
Andrew M. Kuchling
d7b7dde98e
Mention exception in docstring
2008-10-03 16:29:19 +00:00
Nick Coghlan
53663a695e
Issue 2235: __hash__ is once again inherited by default, but inheritance can be blocked explicitly so that collections.Hashable remains meaningful
2008-07-15 14:27:37 +00:00
Robert Schuppenies
9be2ec109b
Added additional __sizeof__ implementations and addressed comments made in
...
Issue3122.
2008-07-10 15:24:04 +00:00
Raymond Hettinger
4267be6478
Multi-arg form for set.difference() and set.difference_update().
2008-06-11 10:30:54 +00:00
Raymond Hettinger
610a93ea26
Handle the case with zero arguments.
2008-06-11 00:44:47 +00:00
Raymond Hettinger
5c4d3d0e4c
Let set.intersection() and set.intersection_update() take multiple input arguments.
2008-06-09 13:07:27 +00:00
Raymond Hettinger
ee4bcad68e
Let set.union() and set.update() accept multiple inputs.
2008-06-09 08:33:37 +00:00
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
2008-06-09 04:58:54 +00:00
Raymond Hettinger
d99bee7c9f
Issue 2855: Fix obscure crasher by slowing down the entire module. Mimics what was done to dictionaries in r59223.
2008-05-30 06:49:47 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Raymond Hettinger
c5a1cc5c37
Frozensets do not benefit from autoconversion.
2008-05-08 04:35:20 +00:00
Raymond Hettinger
a37430a0ce
dict.copy() rises from the ashes. Revert r60687.
2008-02-12 19:05:36 +00:00
Raymond Hettinger
17a74c395e
Add -3 warnings that set.copy(), dict.copy(), and defaultdict.copy() will go away in Py3.x
2008-02-09 04:37:49 +00:00
Christian Heimes
5b970ad483
Unified naming convention for free lists and their limits. All free lists
...
in Object/ are named ``free_list``, the counter ``numfree`` and the upper
limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block.
The chances should make it easier to adjust Python for platforms with
less memory, e.g. mobile phones.
2008-02-06 13:33:44 +00:00
Amaury Forgeot d'Arc
cab3d98ca1
Ensure that PySet_Add() operates on a newly created frozenset, like PyTuple_SetItem does.
...
Add PyFrozenSet_Check(), which was not needed before; The list of Py*Set_Check* macros seems to be complete now.
Add missing NEWS entries about all this.
2008-02-03 22:51:43 +00:00
Raymond Hettinger
7759a0cd76
Factor-out common code with a new macro
2008-01-28 21:47:42 +00:00
Raymond Hettinger
ecdcb58950
Make PySet_Add() work with frozensets.
...
Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
Also, PyFrozenSet_New() is now guaranteed to produce a distinct new frozenset.
2008-01-28 20:34:33 +00:00
Raymond Hettinger
dee3f65d98
Revert PySet_Add() changes.
2008-01-26 09:31:11 +00:00
Raymond Hettinger
d375723365
Update test code for change to PySet_Add().
2008-01-26 08:41:13 +00:00
Raymond Hettinger
7c1be2a3b1
Make PySet_Add() work with frozensets. Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
2008-01-26 08:19:06 +00:00
Raymond Hettinger
3dbd4c536d
Changes 54857 and 54840 broke code and were reverted in Py2.5 just before
...
it was released, but that reversion never made it to the Py2.6 head.
2008-01-25 19:24:46 +00:00
Christian Heimes
e93237dfcc
#1629 : Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
2007-12-19 02:37:44 +00:00
Guido van Rossum
64c06e327d
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
...
With some changes of my own thrown in (e.g. backport of r58107).
2007-11-22 00:55:51 +00:00
Raymond Hettinger
e8d58ba6bb
Reposition the decref (spotted by eagle-eye norwitz).
2007-11-08 18:47:51 +00:00
Raymond Hettinger
1760c8a017
Add set.isdisjoint()
2007-11-08 02:52:43 +00:00
Brett Cannon
0153159e67
Add a bunch of GIL release/acquire points in tp_print implementations and for
...
PyObject_Print().
Closes issue #1164 .
2007-09-17 03:28:34 +00:00
Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Guido van Rossum
360496d9c0
Fix a bug in test_c_api() that caused a negative refcount.
2007-05-10 17:20:15 +00:00
Raymond Hettinger
0bbbfc4c0b
Extend work on rev 52962 and 53829 eliminating redundant PyObject_Hash() calls and fixing set/dict interoperability.
2007-03-20 21:27:24 +00:00
Raymond Hettinger
15cade0568
Fixup set/dict interoperability.
2007-02-19 20:44:04 +00:00
Raymond Hettinger
d6fc72a5ae
Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash().
2007-02-19 02:03:19 +00:00
Raymond Hettinger
0e7a632f57
Bypass set specific optimizations for set and frozenset subclasses.
2007-02-08 00:50:39 +00:00