Message159766
| Author |
mark.dickinson |
| Recipients |
frobnitzem, mark.dickinson |
| Date |
2012年05月01日.19:16:35 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335899796.14.0.0190359542865.issue14704@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Thanks for the report.
This is expected behaviour. It isn't actually anything to do with multiprocessing; it's to do with invoking exec from within a function scope. You can see the same effect with code like this:
code = """\
def show_name():
print my_name
show_name()
"""
def run():
my_name = "me"
exec code
run()
See
http://docs.python.org/reference/executionmodel.html#interaction-with-dynamic-features
for more explanation. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年05月01日 19:16:36 | mark.dickinson | set | recipients:
+ mark.dickinson, frobnitzem |
| 2012年05月01日 19:16:36 | mark.dickinson | set | messageid: <1335899796.14.0.0190359542865.issue14704@psf.upfronthosting.co.za> |
| 2012年05月01日 19:16:35 | mark.dickinson | link | issue14704 messages |
| 2012年05月01日 19:16:35 | mark.dickinson | create |
|