Using wild character

TheFlyingDutchman zzbbaadd at aol.com
Fri Sep 7 03:19:56 CEST 2007


On Sep 6, 5:53 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
> En Thu, 06 Sep 2007 20:48:31 -0300, Zentrader <zentrad... at gmail.com>
> escribi?:
>
> > On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
>
> >> Maybe better the ``in`` operator for the '*string*' type.  `str.find()`
> >> will go away in the future.
>
> > string.find serves a useful purpose in that it returns the starting
> > location of the string found, or -1 if not found, so if you wanted to
> > slice "abdecf" on"c", string.find will tell you where that is.
>
> PEP3100 says it will be removed, but at the same time says [UNLIKELY]...
> <http://www.python.org/dev/peps/pep-3100/#id36>
>
> partition serves almost the same purpose and its easier to use.
>
> --
> Gabriel Genellina

The Perl community has an expression "There is more than one way to do
it". As in, Perl is good because you have multiple choices (whether
it's a function/module/class/operator) of how to implement a
particular piece of logic.  More choices is often good, but this can
lead to a problem in that you might be presented with more things to
learn and or you come across less common ways of doing something that
you are not familiar with in code you are trying to understand.

Does the Python community have a position regarding duplicate ways in
the language to achieve something in your code?




More information about the Python-list mailing list