[Python-Dev] PEP 340 keyword: after

"Martin v. Löwis" martin at v.loewis.de
Thu May 5 14:58:02 CEST 2005


I haven't followed the PEP 340 discussion in detail,
but as the PEP doesn't list keywords that have been
considered and rejected, I'd like to propose my own:
use "after" instead of "block":

after opening("/etc/passwd") as f:
  for line in f:
     print line.rstrip()

after locking(myLock):
  # code that needs to hold the lock

Regards,
Martin


More information about the Python-Dev mailing list