summaryrefslogtreecommitdiff
path: root/Objects/dictobject.c
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Implement PEP 412: Key-sharing dictionaries (closes #13903)Benjamin Peterson2012-04-231-588/+1183
| | | | | | | | | | | | Patch from Mark Shannon.
| | * Issue #2377: Make importlib the implementation of __import__().Brett Cannon2012-04-141-0/+10
| | | | | | | | | | | | | | | | | | | | | importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
| | * Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵Antoine Pitrou2012-04-051-1/+1
| | | | | | | | | | | | the stable ABI.
| | * Issue #14288: Serialization support for builtin iterators.Kristj?n Valur J?nsson2012-04-031-0/+53
| | |
| | * Issue #14383: Add _PyDict_GetItemId() and _PyDict_SetItemId() functionsVictor Stinner2012-03-261-0/+20
| | | | | | | | | | | | | | | These functions simplify the usage of static constant Unicode strings. Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
| | * Close #14205: dict lookup raises a RuntimeError if the dict is modified duringVictor Stinner2012-03-061-12/+6
| | | | | | | | | | | | | | | | | | | | | a lookup. "if you want to make a sandbox on top of CPython, you have to fix segfaults" so let's fix segfaults!
| | * Issue #13521: dict.setdefault() now does only one lookup for the given key, ↵Antoine Pitrou2012-02-271-42/+70
| | |\ | | | | | | | | | | | | | | | | | | | | making it "atomic" for many purposes. Patch by Filip Gruszczyński.
| | * | use the static identifier api for looking up special methodsBenjamin Peterson2012-01-221-4/+2
| | | | | | | | | | | | | | | | | | | | I had to move the static identifier code from unicodeobject.h to object.h in order for this to work.
| | * | Merge with 3.2.Georg Brandl2011-12-181-3/+3
| | |\ \
| | * | | Issue #13389: Full garbage collection passes now clear the freelists forAntoine Pitrou2011-11-151-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | list and dict objects. They already cleared other freelists in the interpreter.
| | * | | Merge 3.2Petri Lehtinen2011-10-241-21/+28
| | |\ \ \
| | | * | | Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.Martin v. Löwis2011-10-141-2/+3
| | | | | |
| | | * | | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-3/+3
| | | | | |
| | | * | | dictviews_or() uses _Py_identifierVictor Stinner2011-10-131-1/+3
| | | | | |
| | | * | | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
| | | * | | Implement PEP 393.Martin v. Löwis2011-09-281-10/+10
| | | | | |
| | | * | | Issue #1621: Fix undefined behaviour in bytes.__hash__, str.__hash__, ↵Mark Dickinson2011-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | tuple.__hash__, frozenset.__hash__ and set indexing operations.
| | | * | | Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.Brian Curtin2011-08-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | The macro was introduced in #12724.
* | | | | | avoid a function call with redundant checks for dict sizeBenjamin Peterson2012-10-311-1/+1
|/ / / / /
* | | | | only fast-path fromkeys() when the constructor returns a empty dict (closes ↵Benjamin Peterson2012-10-311-33/+34
| |_|_|/ |/| | | | | | | | | | | #16345)
* | | | Issue #13521: dict.setdefault() now does only one lookup for the given key, ↵Antoine Pitrou2012-02-271-42/+70
| |_|/ |/| | | | | | | | | | | | | | making it "atomic" for many purposes. Patch by Filip Gruszczyński.
* | | Small clarification in docstring of dict.update(): the positional argument ↵Georg Brandl2011-12-181-3/+3
|/ / | | | | | | is not required.
* | Issue #13018: Fix reference leaks in error paths in dictobject.c.Petri Lehtinen2011-10-241-4/+12
|/ | | | Patch by Suman Saha.
* #11565: Merge with 3.1.Ezio Melotti2011-03-161-40/+108
|\
| * handle dict subclasses gracefully in PyArg_ValidateKeywordArgumentsBenjamin Peterson2010-11-171-1/+1
| |
| * Issue 10221: Improve error message for dict.pop().Raymond Hettinger2010-10-301-2/+1
| |
| * Follow up to #9778: fix regressions on 64-bit Windows buildsAntoine Pitrou2010-10-231-10/+1
| |
| * Remove unneeded casts to hashfunc.Georg Brandl2010-10-181-1/+1
| |
| * fix prototypeBenjamin Peterson2010-10-171-1/+1
| |
| * make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-25/+24
| |
| * Issue #9212: Added the missing isdisjoint method to the dict_keys andDaniel Stutzbach2010-09-021-0/+58
| | | | | | | | | | dict_items views. The method is required by the collections.Set ABC, which the views register as supporting.
| * Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-2050/+2050
| | | | | | | | | | | | | | | | | | | | 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. ........
| * Make (most of) Python's tests pass under Thread Sanitizer.Jeffrey Yasskin2010-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://code.google.com/p/data-race-test/wiki/ThreadSanitizer is a dynamic data race detector that runs on top of valgrind. With this patch, the binaries at http://code.google.com/p/data-race-test/wiki/ThreadSanitizer#Binaries pass many but not all of the Python tests. All of regrtest still passes outside of tsan. I've implemented part of the C1x atomic types so that we can explicitly mark variables that are used across threads, and get defined behavior as compilers advance. I've added tsan's client header and implementation to the codebase in dynamic_annotations.{h,c} (docs at http://code.google.com/p/data-race-test/wiki/DynamicAnnotations). Unfortunately, I haven't been able to get helgrind and drd to give sensible error messages, even when I use their client annotations, so I'm not supporting them.
| * prevent the dict constructor from accepting non-string keyword args #8419Benjamin Peterson2010-04-241-2/+21
| | | | | | | | | | This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments are all strings, using an optimized method if possible.
| * Merged revisions 78515-78516,78522 via svnmerge fromEzio Melotti2010-03-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object. ........ r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line The set types can also be called without arguments. ........ r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line #8030: more docstring fix for builtin types. ........
| * Merged revisions 74075,74187,74197,74201,74216,74225 via svnmerge fromAlexandre Vassalotti2009-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74075 | georg.brandl | 2009-07-18 05:06:31 -0400 (Sat, 18 Jul 2009) | 1 line #6505: fix typos. ........ r74187 | benjamin.peterson | 2009-07-23 10:19:08 -0400 (Thu, 23 Jul 2009) | 1 line use bools for autoraise ........ r74197 | benjamin.peterson | 2009-07-24 22:03:48 -0400 (Fri, 24 Jul 2009) | 1 line clarify ........ r74201 | amaury.forgeotdarc | 2009-07-25 12:22:06 -0400 (Sat, 25 Jul 2009) | 2 lines Better name a variable: 'buf' seems to imply a mutable buffer. ........ r74216 | michael.foord | 2009-07-26 17:12:14 -0400 (Sun, 26 Jul 2009) | 1 line Issue 6581. Michael Foord ........ r74225 | kurt.kaiser | 2009-07-27 12:09:28 -0400 (Mon, 27 Jul 2009) | 5 lines 1. Clean workspace more thoughly before build. 2. Add url of branch we are building to 'results' webpage. (url is now available in $repo_path, could be added to failure email.) 3. Adjust permissions to improve upload reliability. ........
| * Merged revisions 74139 via svnmerge fromBenjamin Peterson2009-07-211-4/+6
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74139 | benjamin.peterson | 2009-07-21 09:08:40 -0500 (Tue, 21 Jul 2009) | 1 line must use _PyThreadState_Current so it isn't checked for NULL #6530 ........
* | #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
* | Issue 10221: Improve error message for dict.pop().Raymond Hettinger2010-10-301-2/+1
| |
* | Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou2010-05-091-2035/+2035
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........ ................
* | Merged revisions 78541 via svnmerge fromEzio Melotti2010-03-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78541 | ezio.melotti | 2010-03-01 06:08:34 +0200 (Mon, 01 Mar 2010) | 17 lines Merged revisions 78515-78516,78522 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object. ........ r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line The set types can also be called without arguments. ........ r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line #8030: more docstring fix for builtin types. ........ ................
* | Merged revisions 74264 via svnmerge fromGeorg Brandl2009-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ................ r74264 | alexandre.vassalotti | 2009-07-29 22:12:15 +0200 (Mi, 29 Jul 2009) | 32 lines Merged revisions 74075,74187,74197,74201,74216,74225 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74075 | georg.brandl | 2009-07-18 05:06:31 -0400 (Sat, 18 Jul 2009) | 1 line #6505: fix typos. ........ r74187 | benjamin.peterson | 2009-07-23 10:19:08 -0400 (Thu, 23 Jul 2009) | 1 line use bools for autoraise ........ r74197 | benjamin.peterson | 2009-07-24 22:03:48 -0400 (Fri, 24 Jul 2009) | 1 line clarify ........ r74201 | amaury.forgeotdarc | 2009-07-25 12:22:06 -0400 (Sat, 25 Jul 2009) | 2 lines Better name a variable: 'buf' seems to imply a mutable buffer. ........ r74216 | michael.foord | 2009-07-26 17:12:14 -0400 (Sun, 26 Jul 2009) | 1 line Issue 6581. Michael Foord ........ r74225 | kurt.kaiser | 2009-07-27 12:09:28 -0400 (Mon, 27 Jul 2009) | 5 lines 1. Clean workspace more thoughly before build. 2. Add url of branch we are building to 'results' webpage. (url is now available in $repo_path, could be added to failure email.) 3. Adjust permissions to improve upload reliability. ........ ................
* | Merged revisions 74140 via svnmerge fromBenjamin Peterson2009-07-211-4/+6
|/ | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74140 | benjamin.peterson | 2009-07-21 09:11:27 -0500 (Tue, 21 Jul 2009) | 9 lines Merged revisions 74139 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74139 | benjamin.peterson | 2009-07-21 09:08:40 -0500 (Tue, 21 Jul 2009) | 1 line must use _PyThreadState_Current so it isn't checked for NULL #6530 ........ ................
* Merged revisions ↵Benjamin Peterson2009-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 73196,73278-73280,73299,73308,73312-73313,73317-73318,73321,73324,73331,73335,73340,73363 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73196 | benjamin.peterson | 2009-06-03 20:40:29 -0500 (Wed, 03 Jun 2009) | 1 line use the offical api ........ r73278 | benjamin.peterson | 2009-06-07 17:33:11 -0500 (Sun, 07 Jun 2009) | 1 line inherit from object ........ r73279 | benjamin.peterson | 2009-06-07 17:35:00 -0500 (Sun, 07 Jun 2009) | 1 line always inherit from an appropiate base class ........ r73280 | benjamin.peterson | 2009-06-07 17:54:35 -0500 (Sun, 07 Jun 2009) | 1 line use booleans for flags ........ r73299 | georg.brandl | 2009-06-08 13:41:36 -0500 (Mon, 08 Jun 2009) | 1 line Typo fix. ........ r73308 | benjamin.peterson | 2009-06-08 17:18:32 -0500 (Mon, 08 Jun 2009) | 1 line remove useless assertion ........ r73312 | benjamin.peterson | 2009-06-08 18:44:13 -0500 (Mon, 08 Jun 2009) | 1 line remove error checks already done in set_context() ........ r73313 | r.david.murray | 2009-06-08 19:44:22 -0500 (Mon, 08 Jun 2009) | 4 lines Issue 2947: document how return code handling translates from os.popen to subprocess. Also fixes reference link in the os.spawn documentation. ........ r73317 | benjamin.peterson | 2009-06-09 12:24:26 -0500 (Tue, 09 Jun 2009) | 1 line make ast.c depend on the grammar ........ r73318 | benjamin.peterson | 2009-06-09 12:29:51 -0500 (Tue, 09 Jun 2009) | 1 line explain why keyword names are not just NAME ........ r73321 | benjamin.peterson | 2009-06-09 16:13:43 -0500 (Tue, 09 Jun 2009) | 1 line update symbol.py from with statement changes ........ r73324 | amaury.forgeotdarc | 2009-06-09 17:53:16 -0500 (Tue, 09 Jun 2009) | 2 lines Avoid invoking the parser/compiler just to test the presence of a function. ........ r73331 | benjamin.peterson | 2009-06-10 08:45:31 -0500 (Wed, 10 Jun 2009) | 1 line fix spelling ........ r73335 | raymond.hettinger | 2009-06-10 11:15:40 -0500 (Wed, 10 Jun 2009) | 1 line Fix signed/unsigned compiler warning. ........ r73340 | amaury.forgeotdarc | 2009-06-10 15:30:19 -0500 (Wed, 10 Jun 2009) | 2 lines Fix a typo spotted by Nick Coghlan. ........ r73363 | benjamin.peterson | 2009-06-11 12:51:17 -0500 (Thu, 11 Jun 2009) | 1 line use multi-with syntax ........
* Merged revisions 72958 via svnmerge fromBenjamin Peterson2009-05-271-4/+7
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72958 | benjamin.peterson | 2009-05-26 22:08:44 -0500 (Tue, 26 May 2009) | 1 line plug ref leak ........
* Merged revisions 72957 via svnmerge fromBenjamin Peterson2009-05-271-5/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72957 | benjamin.peterson | 2009-05-26 21:43:46 -0500 (Tue, 26 May 2009) | 1 line correctly handle descrs with __missing__ ........
* Merged revisions 70550 via svnmerge fromAntoine Pitrou2009-03-231-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70550 | antoine.pitrou | 2009-03-23 20:17:00 +0100 (lun., 23 mars 2009) | 3 lines The tracking statistics were actually too pessimistic ........
* Merged revisions 70546 via svnmerge fromAntoine Pitrou2009-03-231-1/+81
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70546 | antoine.pitrou | 2009-03-23 19:41:45 +0100 (lun., 23 mars 2009) | 9 lines Issue #4688: Add a heuristic so that tuples and dicts containing only untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes. (trivia: this makes the "binary_trees" benchmark from the Computer Language Shootout 40% faster) ........
* Give dict views a helpful __repr__.Raymond Hettinger2009-03-031-3/+18
|
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-7/+7
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.