[Python-Dev] PEP 340 -- loose ends
Reinhold Birkenfeld
reinhold-birkenfeld-nospam at wolke7.net
Wed May 4 20:36:34 CEST 2005
Rodrigo Dias Arruda Senra wrote:
> [ Guido ]:
> > 1. Decide on a keyword to use, if any.
>
> Shouldn't be the other way around ?
> Decide to use *no* keyword, if that could be avoided.
[...]
> Following the PEP and this thread, it seems to me that __no keyword__
> is less preferable than __some keyword__(=='block' so far), and I wonder
> why is not the reverse. Perhaps I missed something ?
There is one problem with using no keyword: You cannot use arbitrary expressions
in the new statement. Consider:
resource = opening("file.txt")
block resource:
(...)
resource = opening("file.txt")
resource:
(...)
The latter would have to be forbidden.
(Seeing these examples, I somehow strongly dislike "block";
"with" or "using" seem really better)
Reinhold
--
Mail address is perfectly valid!
More information about the Python-Dev
mailing list