[docs] [issue26198] PyArg_ParseTuple with format "et#" and "es#" detects overflow by raising TypeError instead of ValueError

Hrvoje Nikšić report at bugs.python.org
Tue Jan 26 09:29:23 EST 2016

Hrvoje Nikšić added the comment:

Barun, Serhiy, thanks for picking this up so quickly.

I would further suggest to avoid using a fixed buffer in abspath (_getfullpathname, but only abspath seems to call it). Other filesystem calls are using the interface where PyArg_ParseTuple allocates the buffer. This makes it easier to handling errors from the native layer by catching OSError or similar, instead of the very generic TypeError (or ValueError).


Python tracker <report at bugs.python.org>

More information about the docs mailing list