[Python-Dev] deprecating string module?
Fredrik Lundh
fredrik@pythonware.com
Thu, 30 May 2002 15:25:58 +0200
david wrote:
> > What's the alternative proposed for C++?
>=20
> Free functions at namespace scope. The analogy would be module-level
> functions in Python. C++ also has multiple string types, but the
> availability of overloading makes this approach practical
it works pretty well in Python too, of course: the string module
delegates to object methods for all functions; e.g. "string.join()"
uses the "join" implementation method to do the actual work, just
like "len()" uses "__len__" (etc).
</F>