Depricated String Functions in Python
Steve Holden
steve at holdenweb.com
Thu Jul 20 09:26:01 EDT 2006
Anoop wrote:
> Thanks Stefen
>
> let me be more specific how would i have to write the following
> function in the deprecated format
>
> map(string.lower,list)
>
To avoid the deprecated usage you would use the unbound method of the
str type (that's the type of all strings):
>>> lst = ['Steve', 'Holden']
>>> map(str.lower, lst)
['steve', 'holden']
>>>
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list