Message270763
A simple try ... except ... can set the variable to Py_None:
>>> import threading
>>> def foo():
... try:
... raise RuntimeError
... except:
... pass
... raise
...
>>> threading.Thread(target=foo).start()
>>> Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "<stdin>", line 6, in foo
RuntimeError: No active exception to reraise
In the startup procedure, some c-apis are called and there are patterns like:
try:
import some_module
except ImportError:
some_module = ...
So I think after startup the variable can't be NULL. But we do see a NULL case here. |
|
Date |
User |
Action |
Args |
2016-07-18 15:30:02 | xiang.zhang | set | recipients:
+ xiang.zhang, pitrou, vstinner, r.david.murray, berker.peksag, ztane, Romuald, davin, abarry |
2016-07-18 15:30:02 | xiang.zhang | set | messageid: <1468855802.29.0.993665741726.issue27558@psf.upfronthosting.co.za> |
2016-07-18 15:30:02 | xiang.zhang | link | issue27558 messages |
2016-07-18 15:30:02 | xiang.zhang | create | |
|