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!
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com