Python Grammar (was Re: A TYPICAL NEWBIE MISTAKE?)
Moshe Zadka
moshez at math.huji.ac.il
Sat May 20 06:30:37 EDT 2000
On Sat, 20 May 2000, Thomas Mangin wrote:
> > > Erm, how would you parse this?
> > >
> > > if yes ()
>
> I would say that seni-colon have *only* to be use to separate condition from
> instruction, so this is :
> if yes ():
> _
But maybe it means:
if yes: ()
Which is perfectly valid Python:
>>> yes = 1
>>> if yes: ()
...
()
>>>
--
Moshe Zadka <moshez at math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com
More information about the Python-list
mailing list