Larry Hastings
2623c8c23c
Issue #20530 : Argument Clinic's signature format has been revised again.
The new syntax is highly human readable while still preventing false
positives. The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
13 years ago
Larry Hastings
581ee3618c
Issue #20326 : Argument Clinic now uses a simple, unique signature to
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326 : Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
13 years ago
Larry Hastings
c20472640c
Issue #20390 : Small fixes and improvements for Argument Clinic.
13 years ago
Larry Hastings
5c66189e88
Issue #20189 : Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
13 years ago
Meador Inge
e02de8c2ad
Fix minor bug in dict.__contains__ docstring.
When dict got clinicized in 8fde1a2c94dc for Issue #16612 an erroneous
trailing quote was left in the clinic docstring summary line.
13 years ago
Larry Hastings
61272b77b0
Issue #19273 : The marker comments Argument Clinic uses have been changed
to improve readability.
13 years ago
Larry Hastings
44e2eaab54
Issue #19674 : inspect.signature() now produces a correct signature
for some builtins.
13 years ago
Victor Stinner
f91929b1d8
Issue #19646 : repr(dict) now uses _PyUnicodeWriter API for better performances
13 years ago
Larry Hastings
ed4a1c5703
Argument Clinic: rename "self" to "module" for module-level functions.
13 years ago
Victor Stinner
5fd2e5ae8a
Issue #19512 : Add a new _PyDict_DelItemId() function, similar to
PyDict_DelItemString() but using an identifier for the key
13 years ago
Larry Hastings
3182680210
Issue #16612 : Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code. (See PEP 436.)
13 years ago
Raymond Hettinger
69492dab07
Factor-out the common code for setting a KeyError.
13 years ago
Antoine Pitrou
9ed5f27266
Issue #18722 : Remove uses of the "register" keyword in C code.
13 years ago
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.
13 years ago
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.
13 years ago
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.
13 years ago
Victor Stinner
a9f61a5a23
Cleanup dictobject.c
13 years ago
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.
13 years ago
Victor Stinner
c9b7f51ec2
Issue #18408 : Fix PyDict_New() to handle correctly new_keys_object() failure
(MemoryError).
13 years ago
Raymond Hettinger
36f74aa7f7
Issue #17563 : Fix dict resize performance regression.
13 years ago
Brett Cannon
f27541653b
Touch up grammar for dict.update() docstring.
13 years ago
Benjamin Peterson
5589850c14
fix warning ( closes #17327 )
13 years ago
Benjamin Peterson
00e9886bd9
Add PyDict_SetDefault. ( closes #17327 )
Patch by Stefan Behnel and I.
13 years ago
Benjamin Peterson
b1efa53662
fix possible setdefault refleak ( closes #17328 )
13 years ago
Antoine Pitrou
0e9958b543
Issue #16562 : Optimize dict equality testing.
Patch by Serhiy Storchaka (reviewed by Martin and Raymond).
14 years ago
Benjamin Peterson
9892f52145
avoid a function call with redundant checks for dict size
14 years ago
Benjamin Peterson
47fa4d54e8
avoid a function call with redundant checks for dict size
14 years ago
Benjamin Peterson
0ec820fc5f
only fast-path fromkeys() when the constructor returns a empty dict ( closes #16345 )
14 years ago
Benjamin Peterson
d1f2cb37a2
only fast-path fromkeys() when the constructor returns a empty dict ( closes #16345 )
14 years ago
Antoine Pitrou
a504a7a7d1
Issue #15055 : update dictnotes.txt. Patch by Mark Shannon.
14 years ago
David Malcolm
49526f48fc
Issue #14785 : Add sys._debugmallocstats() to help debug low-level memory allocation issues
14 years ago
Antoine Pitrou
9a2349030a
Issue #14417 : Mutating a dict during lookup now restarts the lookup instead of raising a RuntimeError (undoes issue #14205 ).
14 years ago
Antoine Pitrou
2d169b268b
Make the reference counting of dictkeys objects participate in refleak hunting
(issue #13903 ).
14 years ago
Benjamin Peterson
a6f195e48e
change insertdict to not steal references ( #13903 )
14 years ago
Benjamin Peterson
15ee821eb5
distiguish between refusing to creating shared keys and error ( #13903 )
14 years ago
Martin v. Loewis
4f2f3b6217
Account for shared keys in type's __sizeof__ ( #13903 ).
14 years ago
Benjamin Peterson
7ce67e45f8
fix dict gc tracking ( #13903 )
14 years ago
Benjamin Peterson
db780d0d13
fix instance dicts with str subclasses ( #13903 )
14 years ago
Benjamin Peterson
53b977127f
don't make shared keys with dict subclasses
14 years ago
Benjamin Peterson
7d95e40721
Implement PEP 412: Key-sharing dictionaries ( closes #13903 )
Patch from Mark Shannon.
14 years ago
Brett Cannon
fd0741555b
Issue #2377 : Make importlib the implementation of __import__().
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__().
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
Victor Stinner
3c1e48176e
Issue #14383 : Add _PyDict_GetItemId() and _PyDict_SetItemId() functions
These functions simplify the usage of static constant Unicode strings.
Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
14 years ago
Victor Stinner
198b291df7
Close #14205 : dict lookup raises a RuntimeError if the dict is modified during
a lookup.
"if you want to make a sandbox on top of CPython, you have to fix segfaults"
so let's fix segfaults!
14 years ago
Antoine Pitrou
e965d97ed1
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
Patch by Filip Gruszczyński.
14 years ago
Benjamin Peterson
ce79852077
use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
15 years ago
Antoine Pitrou
6a1cd1b3b1
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
Patch by Filip Gruszczyński.
14 years ago
Georg Brandl
6f14c330fa
Small clarification in docstring of dict.update(): the positional argument is not required.
15 years ago
Georg Brandl
ac0675cc01
Small clarification in docstring of dict.update(): the positional argument is not required.
15 years ago