New submission from Zdeněk Pavlas: <documentation> There is a global indicator (per thread) of the last error that occurred. Most functions do not clear this on success, but will set it to indicate the cause of the error on failure. Most functions also return an error indicator, usually NULL if they are supposed to return a pointer, or -1 if they return an integer. </documentation>
AIUI, the last error global variable should be ignored, unless function fails. This is not the case. To reproduce: 1. call a C function that sets TypeError, but does not return NULL. 2. run a lot of python code, do some I/O.. everything runs fine. 3. run a regexp match, or import the re module. TypeError is raised. ---------- components: Regular Expressions messages: 185205 nosy: Zdeněk.Pavlas, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: regex code re-raises exceptions on success versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17544> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com