[issue1435] Support for multiple handlers for the "with" statement

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think the added syntactic complexity is worth the relatively rare use case, especially since there's already an implementation of nested() in the contextlib library. -- nosy: +gvanrossum resolution: -> wont fix status: open -> closed

[issue1435] Support for multiple handlers for the "with" statement

2007-11-13 Thread Christian Heimes
Changes by Christian Heimes: -- components: +Interpreter Core -None priority: -> low type: behavior -> rfe versions: +Python 2.6 __ Tracker <[EMAIL PROTECTED]> __

[issue1435] Support for multiple handlers for the "with" statement

2007-11-13 Thread Stavros Korokithakis
Stavros Korokithakis added the comment: What this syntax does is similar to the nested context manager in case 12 of PEP343, but with cleaner syntax. __ Tracker <[EMAIL PROTECTED]> __

[issue1435] Support for multiple handlers for the "with" statement

2007-11-13 Thread Stavros Korokithakis
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 unn