>
> I agree that it's an alternative. There are a number of alternatives.
> However the OP was asking for a "neater/easier" alternative. I argue
> that introducing an external module/function to do the exact same thing
> as a built-in type's method doesn't exactly qualify as a "neater/easier"
> alt
On Fri, 2009-03-20 at 08:52 +1100, Jervis Whitley wrote:
> On Fri, Mar 20, 2009 at 8:28 AM, Albert Hopkins
> wrote:
> > On Fri, 2009-03-20 at 07:25 +1100, Jervis Whitley wrote:
> >> >
> >> >if stringA.lower() in stringB.lower():
> >> >bla bla bla
> >> >
> >>
> >> from string impor
On Fri, Mar 20, 2009 at 8:28 AM, Albert Hopkins wrote:
> On Fri, 2009-03-20 at 07:25 +1100, Jervis Whitley wrote:
>> >
>> > if stringA.lower() in stringB.lower():
>> > bla bla bla
>> >
>>
>> from string import lower
>>
>> if lower(stringA) in lower(stringB):
>> # was thi
On Fri, 2009-03-20 at 07:25 +1100, Jervis Whitley wrote:
> >
> >if stringA.lower() in stringB.lower():
> >bla bla bla
> >
>
> from string import lower
>
> if lower(stringA) in lower(stringB):
> # was this what you were after?
>
This is analogous to standing behind a
>
> if stringA.lower() in stringB.lower():
> bla bla bla
>
from string import lower
if lower(stringA) in lower(stringB):
# was this what you were after?
Cheers,
Jervis
--
http://mail.python.org/mailman/listinfo/python-list
aiwarrior wrote:
> On Mar 13, 9:31 pm, Albert Hopkins wrote:
>> On Fri, 2009-03-13 at 21:04 +, tinn...@isbd.co.uk wrote:
>>> What's the neatest way to do the following in case insensitive fashion:-
>>> if stringA in stringB:
>>> bla bla bla
>>> I know I can just do:-
>>> if str
tinn...@isbd.co.uk wrote:
...
But I was wondering if there's a neater/easier way?
How is "if stringA.lower() in stringB.lower():" complex/messy?
Well I guess I was just looking for "incase" a bit like "strcasecmp"
in C.
Which locales case folding do you want to have applied?
Tino
smime.p
tinn...@isbd.co.uk wrote:
What's the neatest way to do the following in case insensitive fashion:-
if stringA in stringB:
bla bla bla
I know I can just do:-
if stringA.lower() in stringB.lower():
bla bla bla
But I was wondering if there's a neater/easier way?
Not unl
Albert Hopkins wrote:
> On Fri, 2009-03-13 at 21:04 +, tinn...@isbd.co.uk wrote:
> > What's the neatest way to do the following in case insensitive fashion:-
> >
> > if stringA in stringB:
> > bla bla bla
> >
> > I know I can just do:-
> >
> > if stringA.lower() in stringB.l
On Mar 13, 9:31 pm, Albert Hopkins wrote:
> On Fri, 2009-03-13 at 21:04 +, tinn...@isbd.co.uk wrote:
> > What's the neatest way to do the following in case insensitive fashion:-
>
> > if stringA in stringB:
> > bla bla bla
>
> > I know I can just do:-
>
> > if stringA.lower() i
On Fri, 2009-03-13 at 21:04 +, tinn...@isbd.co.uk wrote:
> What's the neatest way to do the following in case insensitive fashion:-
>
> if stringA in stringB:
> bla bla bla
>
> I know I can just do:-
>
> if stringA.lower() in stringB.lower():
> bla bla bla
>
> But I
What's the neatest way to do the following in case insensitive fashion:-
if stringA in stringB:
bla bla bla
I know I can just do:-
if stringA.lower() in stringB.lower():
bla bla bla
But I was wondering if there's a neater/easier way?
--
Chris Green
--
http://mail.pytho
12 matches
Mail list logo