Why does Python mix OO concepts and non OO concepts for operation s on basic types?
pyth at devel.trillke.net
Thu Jun 13 06:09:28 EDT 2002
John La Rooy wrote:
> On Tue, 11 Jun 2002 22:28:44 +0200
> holger krekel <pyth at devel.trillke.net> wrote:
> > Roman Suzi wrote:
> > > I only forgot how will I do this:
> > >
> > > map(string.split, s)
> > >
> > > if GvR will deprecate string module...
> > what about
> > map(str.split, s)
> > :-) holger
> what about
> map(string.capwords, s)
> I'm guessing it's an oversight that there is no str.capwords??
probably. With python 1.6 many methods of the string *module* were
included included directly with the *type* string ('str'). Most
python developers think that the string module should be deprecated
some time in the future. But there are some issues which haven't been
resolved so far. 'capwords' is one of them IMO and not very difficult.
the 'string' module might even be never deprecated because so many
programs (including more than 20 stdlib-modules) use it.
More information about the Python-list