Python grammar..

Delaney, Timothy tdelaney at avaya.com
Tue Jun 12 20:52:02 EDT 2001


> deprecating parens as argument grouping operators is one 
> thing i'd love 
> to see happen in Python! And postfix (only!) ++ and -- and 
> .... and .... 
> aond of course implied self!
> 
> Regards,
> 
> Dave LeBlanc

I don't often say things like this but ...

If you want this, use another language, or write your own. Just don't call
it Python (or anything close).

One of the *worst* things I have ever come across (in VB of course) was
"sometimes you have to call functions with parentheses, sometimes you don't,
and if you call it with parentheses incorrectly, you get a memory leak.

For function/method/procedure calling, there should be one and only one way
to do it, and it must be unambiguous. Oh - and the distinction between a
"function" and a "sub/procedure" has always annoyed the hell out of me. I
way to do it - a subroutine may or may not return a value, at its
discretion, and I should be able to ignore any returned value.

I also dislike increment and decrement operators - the only times I use them
in C/C++ is when I'm doing something idiomatic, such as

	while (*(str++))
	{
	}

at all other times I use += and -=. It looks better, is more versatile (what
happens when I want to change from +1 to +2?) and doesn't suffer from side
effects.

Tim Delaney




More information about the Python-list mailing list