[Tutor] Table of replacements for deprecated fns from 'string' module?

John Fouhy john at fouhy.net
Thu Jun 14 02:03:00 CEST 2007


On 14/06/07, Stephen McInerney <spmcinerney at hotmail.com> wrote:
> Where is there a table of replacements for the deprecated 'string' fns
> esp. the basic common ones e.g. string.split(), join(), replace(), find(),
> index() ?
> http://docs.python.org/lib/node42.html

They've basically all moved into the string type.

e.g. instead of typing "string.split(foo, sep)", you would now type
"foo.split(sep)".

Hence the leading comment on the page you cite: "The following list of
functions are also defined as methods of string and Unicode objects;
see ``String Methods'' (section 3.6.1) for more information on those.
"

-- 
John.


More information about the Tutor mailing list