New submission from Stavros Korokithakis:
Currently, the new "with" statement does not support multiple handlers.
For example, to open two files for input/output you would have to do:
with open("filein") as input:
with open("fileout") as output:
#Do stuff
pass
This adds unnecessary complexity, and would be unwieldy with multiple
code blocks. Would something like the following be feasible?
with open("filein") as input, open("fileout") as output:
# Do stuff
pass
This syntax is fully backwards-compatible, so there shouldn't be any
problem there.
----------
components: None
messages: 57446
nosy: Stavros
severity: minor
status: open
title: Support for multiple handlers for the "with" statement
type: behavior
versions: Python 2.5
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1435>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com