Marko Rauhamaa wrote:
with open(path) as f: ...If the open() call is guarded against exceptions (as it usually should), one must revert to the classic syntax:
Hmmm, maybe we could do with a with-except statement: with open(path) as f: ... except IOError: # Catches exceptions in the with-expression only ... Although that would be a bit confusing. -- Greg -- https://mail.python.org/mailman/listinfo/python-list