New statement proposal for Python
root at rainerdeyke.com
Fri Jun 15 06:39:05 CEST 2001
"David LeBlanc" <whisper at oz.nospamnet> wrote in message
news:9gbsdv$8ft$9 at 188.8.131.52...
> In article <mailman.992549543.6896.python-list at python.org>,
> skip at pobox.com says...
> > David> My proposal:
> > David> alias httpport : 80
> > ...
> > Interesting idea. Why do you prefer ":" over "="?
> I prefer : to = because this isn't an assignment per se. It is not, imho,
> a departure from python usage:
> def fn(a,b,c):
'def', while not an assignment per se, has the same semantics as assignment,
i.e. a name bound with 'def' can be rebound with assignment and vice versa.
The following two statements are basically identical:
def f(x): return x
f = lambda x: x
I consider this a wart in the language. Binding a function to a name is
logically and physically the same operation as binding any other value to a
name; it should therefore use the same syntax.
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
More information about the Python-list