[Python-Dev] "begin" as keyword for pep 340

Mitja Marn mitja.marn at gmail.com
Wed May 4 21:10:34 CEST 2005


On 5/4/05, Reinhold Birkenfeld <reinhold-birkenfeld-nospam at wolke7.net> 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()


More information about the Python-Dev mailing list