diff options
author | Larry Hastings <larry@hastings.org> | 2015-04-16 03:02:12 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-04-16 03:02:12 (GMT) |
commit | 7f90cba7f3f2ebd7eb5e614917014760f61c6ec8 (patch) | |
tree | 48ccae17547e5bec410f9233de0e60df3da67c54 /Modules | |
parent | 3b8124884c3655b4cf2629d741b18c1a38181805 (diff) | |
download | cpython-7f90cba7f3f2ebd7eb5e614917014760f61c6ec8.zip cpython-7f90cba7f3f2ebd7eb5e614917014760f61c6ec8.tar.gz cpython-7f90cba7f3f2ebd7eb5e614917014760f61c6ec8.tar.bz2 |
Issue #23935: Argument Clinic's understanding of format units
accepting bytes, bytearrays, and buffers is now consistent with
both the documentation and the implementation.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_dbmmodule.c | 4 | ||||
-rw-r--r-- | Modules/arraymodule.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c index bcdea1d..b815e97 100644 --- a/Modules/_dbmmodule.c +++ b/Modules/_dbmmodule.c @@ -272,7 +272,7 @@ dbm.dbm.get self: dbmobject - key: str(length=True) + key: str(types={'str', 'robuffer'}, length=True) default: object = None / @@ -282,7 +282,7 @@ Return the value for key if present, otherwise default. static PyObject * dbm_dbm_get_impl(dbmobject *dp, const char *key, Py_ssize_clean_t key_length, PyObject *default_value) -/*[clinic end generated code: output=4f5c0e523eaf1251 input=aecf5efd2f2b1a3b]*/ +/*[clinic end generated code: output=4f5c0e523eaf1251 input=f81478bc211895ef]*/ { datum dbm_key, val; diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 49f837c..4704490 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1600,7 +1600,7 @@ frombytes(arrayobject *self, Py_buffer *buffer) /*[clinic input] array.array.fromstring - buffer: Py_buffer(types='str bytes bytearray buffer') + buffer: Py_buffer(types={'str', 'buffer'}) / Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method). @@ -1610,7 +1610,7 @@ This method is deprecated. Use frombytes instead. static PyObject * array_array_fromstring_impl(arrayobject *self, Py_buffer *buffer) -/*[clinic end generated code: output=31c4baa779df84ce input=1302d94c97696b84]*/ +/*[clinic end generated code: output=31c4baa779df84ce input=fdde1a56cbe2b05b]*/ { if (PyErr_WarnEx(PyExc_DeprecationWarning, "fromstring() is deprecated. Use frombytes() instead.", 2) != 0) @@ -1929,7 +1929,7 @@ make_array(PyTypeObject *arraytype, char typecode, PyObject *items) array._array_reconstructor arraytype: object(type="PyTypeObject *") - typecode: int(types='str') + typecode: int(types={'str'}) mformat_code: int(type="enum machine_format_code") items: object / @@ -1942,7 +1942,7 @@ array__array_reconstructor_impl(PyModuleDef *module, PyTypeObject *arraytype, int typecode, enum machine_format_code mformat_code, PyObject *items) -/*[clinic end generated code: output=6ecbf0e8e4d92ab9 input=f72492708c0a1d50]*/ +/*[clinic end generated code: output=6ecbf0e8e4d92ab9 input=a9ae223306d7b262]*/ { PyObject *converted_items; PyObject *result; |