A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-May/053329.html below:

[Python-Dev] PEP 340 -- loose ends

[Python-Dev] PEP 340 -- loose ends [Python-Dev] PEP 340 -- loose endsReinhold 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4