Commit Graph

307 Commits

Author SHA1 Message Date
Victor Stinner
f91929b1d8 Issue #19646: repr(dict) now uses _PyUnicodeWriter API for better performances 2013-11-19 13:07:38 +01:00
Larry Hastings
ed4a1c5703 Argument Clinic: rename "self" to "module" for module-level functions. 2013-11-18 09:32:13 -08:00
Victor Stinner
5fd2e5ae8a Issue #19512: Add a new _PyDict_DelItemId() function, similar to
PyDict_DelItemString() but using an identifier for the key
2013-11-06 18:58:22 +01:00
Larry Hastings
3182680210 Issue #16612: Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code.  (See PEP 436.)
2013-10-19 00:09:25 -07:00
Raymond Hettinger
69492dab07 Factor-out the common code for setting a KeyError. 2013-09-02 15:59:26 -07:00
Antoine Pitrou
9ed5f27266 Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
Victor Stinner
5b3b1006bb Issue #18520: Fix _PyDict_GetItemId(), suppress _PyUnicode_FromId() error
As PyDict_GetItem(), _PyDict_GetItemId() suppresses all errors that may occur,
for historical reasons.
2013-07-22 23:50:57 +02:00
Victor Stinner
f97dfd7b59 Issue #18408: Fix dict_repr(), don't call PyObject_Repr() with an exception set
PyObject_Repr() can removes the current exception. For example, module_repr()
calls PyErr_Clear() if calling loader.module_repr(mod) failed.
2013-07-18 01:00:45 +02:00
Victor Stinner
ac2a4fe8a2 Issue #18408: dict_new() now fails on new_keys_object() error
Pass the MemoryError exception to the caller, instead of using empty keys.
2013-07-16 22:19:00 +02:00
Victor Stinner
a9f61a5a23 Cleanup dictobject.c 2013-07-16 22:17:26 +02:00
Victor Stinner
fdcbab9602 Issue #18408: Fix PyDict_GetItemString(), suppress PyUnicode_FromString() error
As PyDict_GetItem(), PyDict_GetItemString() suppresses all errors that may
occur for historical reasons.
2013-07-16 22:16:05 +02:00
Victor Stinner
c9b7f51ec2 Issue #18408: Fix PyDict_New() to handle correctly new_keys_object() failure
(MemoryError).
2013-07-08 22:19:20 +02:00
Raymond Hettinger
2f6fe51860 merge 2013-05-17 03:24:54 -07:00
Raymond Hettinger
36f74aa7f7 Issue #17563: Fix dict resize performance regression. 2013-05-17 03:01:13 -07:00
Brett Cannon
f27541653b Touch up grammar for dict.update() docstring. 2013-05-11 14:46:48 -04:00
Benjamin Peterson
5589850c14 fix warning (closes #17327) 2013-03-08 08:36:49 -05:00
Benjamin Peterson
00e9886bd9 Add PyDict_SetDefault. (closes #17327)
Patch by Stefan Behnel and I.
2013-03-07 22:16:29 -05:00
Benjamin Peterson
42f382facd merge 3.3 (#17328) 2013-03-04 09:48:30 -05:00
Benjamin Peterson
b1efa53662 fix possible setdefault refleak (closes #17328) 2013-03-04 09:47:50 -05:00
Antoine Pitrou
0e9958b543 Issue #16562: Optimize dict equality testing.
Patch by Serhiy Storchaka (reviewed by Martin and Raymond).
2012-12-02 19:10:07 +01:00
Benjamin Peterson
591c921411 merge 3.2 2012-10-31 14:22:25 -04:00
Benjamin Peterson
9892f52145 avoid a function call with redundant checks for dict size 2012-10-31 14:22:12 -04:00
Benjamin Peterson
d97eb0d338 merge 3.2 (#16345) 2012-10-31 14:09:11 -04:00
Benjamin Peterson
d1f2cb37a2 only fast-path fromkeys() when the constructor returns a empty dict (closes #16345) 2012-10-31 14:05:55 -04:00
Antoine Pitrou
a504a7a7d1 Issue #15055: update dictnotes.txt. Patch by Mark Shannon. 2012-06-24 21:03:45 +02:00