New python user seeks comments

Moshe Zadka moshez at math.huji.ac.il
Wed Apr 21 15:38:48 EDT 1999


On 21 Apr 1999, Chad McDaniel wrote:

> Martijn Faassen <faassen at pop.vet.uu.nl> writes:
> > David Steuber wrote:
<snip>
> > > expected.  Who would have guessed that you couldn't give a file object
> > > thename 'in'?  Or at least that was one of the weirder obstacles.
> > 
> > It's not that weird as 'in' is a reserved keyword in Python. :)
> It seems that Python could have mentioned that to the user.

This is a valid criticism:
>>> in=1
  File "<stdin>", line 1
    in=1
     ^
SyntaxError: invalid syntax

An error message like 'invalid usage of reserved word' would go a long
way to help the programmer. I'm not well aquainted enough with the parser
to know whether this is possible or not...

--
Moshe Zadka <mzadka at geocities.com>. 
QOTD: What fun to me! I'm not signing permanent.





More information about the Python-list mailing list