Message136178
| Author |
thebits |
| Recipients |
thebits |
| Date |
2011年05月17日.20:38:52 |
| SpamBayes Score |
1.0629131e-10 |
| Marked as misclassified |
No |
| Message-id |
<1305664733.32.0.991268423513.issue12098@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I run this code:
"""
from multiprocessing import Pool
def myfunc(x):
assert False
#if __debug__: print 'debug'
return x - 1
if __name__ == '__main__':
pool = Pool(processes=1)
it = pool.imap(myfunc, xrange(5)) # or imap_unordered, map
print it.next()
python -O myscript.py
"""
The myfunc() always raise AssertionError. But I run script with "-O" (optimization) command.
Interpreter is:
"""
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
"""
Thanks! |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年05月17日 20:38:53 | thebits | set | recipients:
+ thebits |
| 2011年05月17日 20:38:53 | thebits | set | messageid: <1305664733.32.0.991268423513.issue12098@psf.upfronthosting.co.za> |
| 2011年05月17日 20:38:52 | thebits | link | issue12098 messages |
| 2011年05月17日 20:38:52 | thebits | create |
|