Built-ins vs. modules

Roy Smith roy at panix.com
Tue Apr 15 07:39:31 EDT 2003


Paul Berkowitz <berkowit at silcom.com> wrote:
> Why import the string module if you can do the same things anyway? The page
> of built in String Methods bears an uncanny resemblance to the page on the
> string module. Is there a historical reason? Are the built in type methods
> quite recent?

The string module came first.  Later (I forget exactly which release, 
but I'm guessing either 2.0 or 2.1) the string type was overhauled to 
make most of the functionality of the string module into built-in string 
methods.

The string module is basicly obsolete at this point.  All new code you 
write really should use the string methods.




More information about the Python-list mailing list