a = b = 1 just syntactic sugar?

Martin v. Löwis martin at v.loewis.de
Mon Jun 9 06:51:43 EDT 2003


Ed Avis <ed at membled.com> writes:

> >For example, what is the meaning of
> >
> >a = lambda b : return b > 0
> 
> I propose it to mean the same as
> 
>     def fresh(b):
>       return b > 0
>     a = fresh

Why not the same as

def fresh(b):
  return b
a = fresh > 0

?

Regards,
Martin




More information about the Python-list mailing list