Python Feature Request: Add the "using" keyword which works like "with" in Visual Basic
Paul Boddie
paul at boddie.org.uk
Mon Apr 16 12:11:42 EDT 2007
samjnaa at gmail.com wrote:
> Please check for sanity and approve for posting at python-dev.
Technically, you can post it yourself to python-dev, but you'll just
get bounced back here to discuss it with us. ;-)
> In Visual Basic there is the keyword "with" which allows an object-
> name to be declared as governing the following statements. For
> example:
>
> with quitCommandButton
> .enabled = true
> .default = true
> end with
This is how the discussion started for the current "with" statement,
although it ended up doing something somewhat different.
[...]
> Now I hear that the word "with" is being discussed for a different
> purpose in Py 3 as a result of a PEP and I don't want to conflict with
> that.
The "with" keyword appears in 2.5 onwards.
Paul
More information about the Python-list
mailing list