A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-June/119907.html below:

Fix potential NameError in multiprocessing.Condition.wait()

[Python-Dev] [Python-checkins] cpython: Fix potential NameError in multiprocessing.Condition.wait()shibturn shibturn at gmail.com
Tue Jun 5 13:00:47 CEST 2012
On 05/06/2012 6:59am, Eli Bendersky wrote:
> Can you add a testcase for this?
> ...

OK.

BTW, I should have written UnboundLocalError not NameError:

 >>> import multiprocessing as mp
[81047 refs]
 >>> c = mp.Condition()
[88148 refs]
 >>> with mp.Condition() as c: c.wait()
...
<Press Ctrl-C>
Traceback (most recent call last):
   File "C:\Repos\cpython-dirty\lib\multiprocessing\synchronize.py", 
line 219, in wait
     ret = self._wait_semaphore.acquire(True, timeout)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Repos\cpython-dirty\lib\multiprocessing\synchronize.py", 
line 227, in wait
     return ret
UnboundLocalError: local variable 'ret' referenced before assignment
[88218 refs]

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4