Message144799
Because a generator can legitimately have no locals:
>>> def gen():
... yield 1
...
>>> g = gen()
>>> g.gi_frame.f_locals
{}
Errors should be reported as exceptions - AttributeError or TypeError if there's no gi_frame and then ValueError or RuntimeError if gi_frame is None. |
|
Date |
User |
Action |
Args |
2011-10-03 02:02:59 | ncoghlan | set | recipients:
+ ncoghlan, meador.inge, daniel.urban, Yury.Selivanov, eric.snow |
2011-10-03 02:02:59 | ncoghlan | set | messageid: <1317607379.86.0.272110831639.issue13062@psf.upfronthosting.co.za> |
2011-10-03 02:02:59 | ncoghlan | link | issue13062 messages |
2011-10-03 02:02:59 | ncoghlan | create | |
|