Re: Just remember that Python is sexy

2005-06-03 Thread Scott Kirkwood
Yes, but we don't want it to get out of hand, like calling it orgy() instead of join(). Or condom() instead of secure(). Or onClimax() instead of onFinished() :-)On 5/31/05, Eric Pederson <[EMAIL PROTECTED]> wrote: > I often can't remember that to remove spaces from a string whether it's> strip()

Re: Just remember that Python is sexy

2005-05-30 Thread Eric Pederson
> I often can't remember that to remove spaces from a string whether it's > strip() or trim(), and when finding patterns with the re library > whether it's find() or search() and when iterating over key, values of > a dictionary whether it's items() or entries(). > But then I remember that Python i

Re: Just remember that Python is sexy

2005-05-26 Thread Ville Vainio
> "Greg" == Greg Ewing <[EMAIL PROTECTED]> writes: >> The name index implies it returns something you can use as an index >> to get at the substring. Greg> But that's no fun -- it doesn't involve sex! Greg> How about this: "index" and "sex" both end with "ex", which Greg>

Re: Just remember that Python is sexy

2005-05-26 Thread Greg Ewing
Duncan Booth wrote: > The name index implies it returns something you can use as an index to get > at the substring. But that's no fun -- it doesn't involve sex! How about this: "index" and "sex" both end with "ex", which is short for "exception". (Of course, you could get straight from "index

Re: Just remember that Python is sexy

2005-05-26 Thread Duncan Booth
Sion Arrowsmith wrote: >>The name index implies it returns something you can use as an index to >>get at the substring. > > Unfortunately, -1 can of course be used as an index. Mind you, it > would be perverse to expect to find the substring at it. > That was my point. The returned index always

Re: Just remember that Python is sexy

2005-05-26 Thread Sion Arrowsmith
Duncan Booth <[EMAIL PROTECTED]> wrote: >Ville Vainio wrote: >>> "Peter" == Peter Hansen <[EMAIL PROTECTED]> writes: >> Peter> Sion Arrowsmith wrote: >> >> But can you come up with a method for remembering which way >> >> round str.find() and str.index() are? >> >> Peter> Don'

Re: Just remember that Python is sexy

2005-05-26 Thread Peter Hansen
Ville Vainio wrote: >>"Peter" == Peter Hansen <[EMAIL PROTECTED]> writes: > Peter> Sion Arrowsmith wrote: > >> But can you come up with a method for remembering which way > >> round str.find() and str.index() are? > > Peter> Don't use "str" and you won't have anything to rememb

Re: Just remember that Python is sexy

2005-05-26 Thread Duncan Booth
Ville Vainio wrote: >> "Peter" == Peter Hansen <[EMAIL PROTECTED]> writes: > > Peter> Sion Arrowsmith wrote: > >> But can you come up with a method for remembering which way > >> round str.find() and str.index() are? > > Peter> Don't use "str" and you won't have anything to r

Re: Just remember that Python is sexy

2005-05-26 Thread Ville Vainio
> "Peter" == Peter Hansen <[EMAIL PROTECTED]> writes: Peter> Sion Arrowsmith wrote: >> But can you come up with a method for remembering which way >> round str.find() and str.index() are? Peter> Don't use "str" and you won't have anything to remember: Peter> 'foo bar baz'

Re: Just remember that Python is sexy

2005-05-25 Thread Peter Hansen
Sion Arrowsmith wrote: > But can you come up with a method for remembering which way > round str.find() and str.index() are? Don't use "str" and you won't have anything to remember: 'foo bar baz'.find('spam') 'spanish inquisition'.index('parrot') -Peter -- http://mail.python.org/mailman/listinf

Re: Just remember that Python is sexy

2005-05-25 Thread Sion Arrowsmith
Scott Kirkwood <[EMAIL PROTECTED]> wrote: >I often can't remember that to remove spaces from a string whether it's >strip() or trim(), and when finding patterns with the re library >whether it's find() or search() and when iterating over key, values of >a dictionary whether it's items() or entries(

Re: Just remember that Python is sexy

2005-05-24 Thread Do Re Mi chel La Si Do
:-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Just remember that Python is sexy

2005-05-24 Thread Scott Kirkwood
Silly but true. It started with trying to figure how to remember it's strip() and not trim(). Then it went downhill from there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Just remember that Python is sexy

2005-05-24 Thread Fuzzyman
Scott Kirkwood wrote: > I often can't remember that to remove spaces from a string whether it's > strip() or trim(), and when finding patterns with the re library > whether it's find() or search() and when iterating over key, values of > a dictionary whether it's items() or entries(). > But then I

Just remember that Python is sexy

2005-05-23 Thread Scott Kirkwood
I often can't remember that to remove spaces from a string whether it's strip() or trim(), and when finding patterns with the re library whether it's find() or search() and when iterating over key, values of a dictionary whether it's items() or entries(). But then I remember that Python is "sexy".