[New-bugs-announce] [issue12098] Child process running as debug

Sergey Mezentsev report at bugs.python.org
Tue May 17 22:38:53 CEST 2011

New submission from Sergey Mezentsev <thebits at yandex.ru>:

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


components: Interpreter Core, Library (Lib), Windows
messages: 136178
nosy: thebits
priority: normal
severity: normal
status: open
title: Child process running as debug
type: behavior
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list