String functions deprication

Dan dan at cellectivity.com
Tue Aug 16 13:00:50 EDT 2005


> 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
  ['any', 'old', 'string']

-- 
      You know, I've been real busy.
          - Mike Foster, then-governor of Louisiana, when
            asked the name of his newborn seventh grandchild.





More information about the Python-list mailing list