String functions deprication
Reinhold Birkenfeld
reinhold-birkenfeld-nospam at wolke7.net
Wed Aug 17 15:41:04 EDT 2005
Dan wrote:
>> http://www.python.org/doc/2.4.1/lib/node110.html
>>
>> These methods are being deprecated. What are they being replaced
>> with?
>
> They're being made methods of the string class itself.
>
> For example:
> >>> s = 'any old string'
> >>> string.split(s, ' ') # Old way
> ['any', 'old', 'string']
> >>> s.split() # New way
s.split(' '), if we want to be equivalent.
> ['any', 'old', 'string']
Reinhold
More information about the Python-list
mailing list