New python user seeks comments

Ivan Van Laningham ivanlan at callware.com
Wed Apr 21 16:12:41 EDT 1999


Pythonistas--

Chad McDaniel wrote:
> 
> Martijn Faassen <faassen at pop.vet.uu.nl> writes:
> 
> > David Steuber wrote:
> > >
> > > Er, uh, hmm.
> > >
> > > I wrote my first Python program today.  It took longer than I
> > > expected.  Who would have guessed that you couldn't give a file object
> > > the name 'in'?  Or at least that was one of the weirder obstacles.
> >
> > It's not that weird as 'in' is a reserved keyword in Python. :)
> >
> > for i in whatever:
> >    print "See?"
> >
> 
> It seems that Python could have mentioned that to the user.
> 
> --
> -chad

	http://www.python.org/doc/ref/keywords.html

The interpreter also states, in response to an attempt to assign a
number to a variable named `in', that such usage is a Syntax Error.

It could be changed to ``Fruitless attempt to assign to keyword Error,''
I suppose.

<for in.in in in : panic>-ly y'rs,
Ivan =:o
----------------------------------------------
Ivan Van Laningham
Callware Technologies, Inc.
ivanlan at callware.com
http://www.pauahtun.org
See also: 
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps:  Cu Chi, Class of '70
----------------------------------------------




More information about the Python-list mailing list