Issue 1242657: list(obj) can swallow KeyboardInterrupt.

This commit is contained in:
Raymond Hettinger 2009-02-02 21:50:13 +00:00
parent d7bb4d484f
commit b516370bcb
7 changed files with 65 additions and 15 deletions

View file

@ -438,7 +438,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
/*
Guess the size of object o using len(o) or o.__length_hint__().
If neither of those return a non-negative value, then return the
default value. This function never fails. All exceptions are cleared.
default value. If one of the calls fails, this function returns -1.
*/
PyAPI_FUNC(PyObject *) PyObject_GetItem(PyObject *o, PyObject *key);