58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
From: ivanlan at callware.com (Ivan Van Laningham)
|
|
Date: Wed, 21 Apr 1999 20:12:41 GMT
|
|
Subject: New python user seeks comments
|
|
References: <m3wvz61tkp.fsf@solo.david-steuber.com>
|
|
<371DA955.9F13B144@pop.vet.uu.nl> <x1jlnflztfl.fsf@unhinged.engr.sgi.com>
|
|
Message-ID: <371E3139.FDDF65A1@callware.com>
|
|
Content-Length: 1194
|
|
X-UID: 1232
|
|
|
|
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
|
|
----------------------------------------------
|
|
|
|
|
|
|
|
|