This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Stavros
Recipients Stavros
Date 2007-11-13.12:17:59
SpamBayes Score 0.14577065
Marked as misclassified No
Message-id <1194956280.18.0.690384214336.issue1435@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2007-11-13 12:18:00Stavrossetspambayes_score: 0.145771 -> 0.14577065
recipients: + Stavros
2007-11-13 12:18:00Stavrossetspambayes_score: 0.145771 -> 0.145771
messageid: <1194956280.18.0.690384214336.issue1435@psf.upfronthosting.co.za>
2007-11-13 12:18:00Stavroslinkissue1435 messages
2007-11-13 12:17:59Stavroscreate