Python keywords

gtb goodTweetieBird at hotmail.com
Fri Apr 27 00:08:08 CEST 2007


On Apr 26, 1:59 pm, "Hamilton, William " <wham... at entergy.com> wrote:
> > -----Original Message-----
> > From: python-list-bounces+whamil1=entergy.... at python.org
> [mailto:python-
> > list-bounces+whamil1=entergy.... at python.org] On Behalf Of gtb
> > Sent: Thursday, April 26, 2007 1:50 PM
> > To: python-l... at python.org
> > Subject: Re: Python keywords
>
> > On Apr 26, 10:16 am, Larry Bates <larry.ba... at websafe.com> wrote:
> > >http://docs.python.org/ref/keywords.html
>
> > > in keyword is a general one and can be used for many objects.
>
> > > x in 'xyz'
>
> > > y in ['a','b','c','y','z'']
>
> > > z in ('a','b','c','y','z']
>
> > > key in {'key1':1, 'key2': 2}
>
> > > The in you see with a for isn't associated with the for loop
> > > but rather the sequence you are iterating over
>
> > > for i in range(10):
>
> > > -Larry
>
> > Thanks Larry. I saw that page you referenced above and that is how I
> > knew it was a keyword. But I still have found nodocumentation that
> > supports the examples you provided.
>
> http://docs.python.org/ref/comparisons.html#l2h-438
>
> This information is 2 clicks away from any page in the reference:  click
> the index link, then scroll down to the link to "in operator".
>
> ---
> -Bill Hamilton

Thanks, Bill.

I clicked there before and decided I must be experiencing an indexing
error or such due to using firefox instead of IE when I didn't see "in
operator" at the top of the page.

Best Regards,

john




More information about the Python-list mailing list