New statement proposal for Python

Rainer Deyke root at
Fri Jun 15 00:39:05 EDT 2001

"David LeBlanc" <whisper at oz.nospamnet> wrote in message
news:9gbsdv$8ft$9 at
> In article <mailman.992549543.6896.python-list at>,
> skip at 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
Shareware computer games           - 
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

More information about the Python-list mailing list