> Part of the idea (or at least my idea) behind adding the do/with > statement which was discussed a while ago was to fix this problem. > > with lock: > ... critical section ... > > would ensure that lock.release() is called properly. Right. That was also my idea (I think many people've had this idea :-). It has the advantage of being more generally useful than adding an initially clause to the try/finally statement. --Guido van Rossum (home page: http://www.python.org/~guido/)
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