[issue10057] Unclear if exception should be set

2010-10-09 Thread Jan Kratochvil
Jan Kratochvil added the comment: OK, I am not used to Python, thanks. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ _

[issue10057] Unclear if exception should be set

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: I find it quite clear. "failure" not only means that no item was found, but also that the operation failed, i.e. raised an exception. In general, a NULL pointer returned from a function that returns PyObject* *always* means that there is an exception. There

[issue10057] Unclear if exception should be set

2010-10-09 Thread Jan Kratochvil
New submission from Jan Kratochvil : http://docs.python.org/py3k/c-api/object.html PyObject_GetItem Return element [...] or NULL on failure. Found element => return its pointer. Found no element => return NULL (with no exception set). But it is unclear whether the function can also: Error happe