Re: string.find for case insensitive search

2007-02-07 Thread Don Morrison
> Don Morrison wrote: > > string.find is deprecated as per the official python documentation. > > > but the str.find() method isn't. > > > take a look at the "re" module > > > A possibility. > > regards > Steve Thank you everyone.

Re: string.find for case insensitive search

2007-02-07 Thread Don Morrison
My apologies, I confused the built-in "str" with the module "string". I was reading from the section of the 2.4.4 docs called: 4.1.4 Deprecated string functions On 2/7/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Don Morrison wrote: > > lower() is also deprecat

Re: string.find for case insensitive search

2007-02-07 Thread Don Morrison
string.find is deprecated as per the official python documentation. take a look at the "re" module On 7 Feb 2007 12:53:36 -0800, Johny <[EMAIL PROTECTED]> wrote: > Is there a good way how to use string.find function to find a > substring if I need to you case insensitive substring? > Thanks for r

Re: string.find for case insensitive search

2007-02-07 Thread Don Morrison
lower() is also deprecated :) oh well On 7 Feb 2007 21:06:08 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: > "Johny" <[EMAIL PROTECTED]> wrote: > > > Is there a good way how to use string.find function to find a > > substring if I need to you case insensitive substring? > > s.lower().find(substring

Re: lambda functions ?

2007-02-05 Thread Don Morrison
Maybe you would like a generator: >>> def f(n): ... while True: ... n += 1 ... yield n ... >>> a = f(5) >>> >>> a.next() 6 >>> a.next() 7 >>> a.next() 8 >>> a.next() 9 >>> On 2/5/07, Maxim Veksler <[EMAIL PROTECTED]> wrote: > Hello, > I'm new on this list and in pytho