[Python-Dev] PEP 340 -- loose ends

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Wed May 4 21:45:36 CEST 2005


Ka-Ping Yee wrote:

> Reinhold Birkenfeld wrote:
>> Well, with it you could create suites with _any_ introducing
>> identifier. Consider:
>>
>> with:
>>     (...)
>>
>> synchronized:
>>     (...)
>>
>> try:
>>     (...)
>>
>> transaction:
>>     (...)
>>
>> Do you understand my concern? It would be very, very hard to discern
>> these "user-defined statements" from real language constructs.
> 
> I think part of the debate is about whether that's good or bad.
> I happen to agree with you -- i think a keyword is necessary --
> but i believe some people see an advantage in having the flexibility
> to make a "real-looking" construct.

Yes. But it would only be crippled, as the "keyword" would have to be a
pre-constructed generator instance which cannot be easily reused as a
library export (at least, it is not intended this way).

> As i see it the argument boils down to: Python is not Lisp.
> 
> There are good reasons why the language has keywords, why it
> distinguishes statements from expressions, uses indentation, and
> so on.  All of these properties cause Python programs to be made
> of familiar and easily recognizable patterns instead of degenerating
> into a homogeneous pile of syntax.

Big ACK.

Reinhold

-- 
Mail address is perfectly valid!



More information about the Python-Dev mailing list