Hello
I have been developing a code that works pretty well on my python 2.3
and now when i am running it on my server where it is programmed to run
it's giving me errors. I have been using __contains__ method and it
fails on python 2.2
For example
(Python 2.3)[color=blue][color=green]
>> x="Hello World"
>> print x.__contains__( "Hello")[/color][/color]
True
(Python 2.2)
[color=blue][color=green][color=darkred]
>>> x="Hello world"
>>> print x.__contains__( "Hello")[/color][/color][/color]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'in <string>' requires character as left operand
Is there any woraround for this or what am i doing wrong in 2.2 ?
Thanks
ASB
I have been developing a code that works pretty well on my python 2.3
and now when i am running it on my server where it is programmed to run
it's giving me errors. I have been using __contains__ method and it
fails on python 2.2
For example
(Python 2.3)[color=blue][color=green]
>> x="Hello World"
>> print x.__contains__( "Hello")[/color][/color]
True
(Python 2.2)
[color=blue][color=green][color=darkred]
>>> x="Hello world"
>>> print x.__contains__( "Hello")[/color][/color][/color]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'in <string>' requires character as left operand
Is there any woraround for this or what am i doing wrong in 2.2 ?
Thanks
ASB
Comment