On 5/4/05, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote:
> PS: What about "using"? Too C#-ish?
Another idea from a hobbyist programmer: "holding" or mabe just
"hold". Like this:
hold locked(myLock):
# Code here executes with myLock held. The lock is
# guaranteed to be released when the block is left (even
# if via return or by an uncaught exception).
hold opened("/etc/passwd") as f:
for line in f:
print line.rstrip()
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com