Why does Python mix OO concepts and non OO concepts for opera tion s on basic types?
Delaney, Timothy
tdelaney at avaya.com
Thu Jun 13 19:57:12 EDT 2002
> From: holger krekel [mailto:pyth at devel.trillke.net]
>
> 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
I think "most" is a little bit strong. The general feeling that I get seems
to be pretty much split down the middle.
I personally *don't* favour getting rid of the string module - there are
many things which lend themselves better to a non-object-oriented style -
and many of the string functions are included.
Now, if the str type included *all* of this functionality, *and* was aliased
to string, then you may have a case ... although 'import string' would still
need to work (for backwards compatibility) until 3.0.
Whilst I like str as a type name, I don't think it is expressive enough for
the string functions.
Tim Delaney
More information about the Python-list
mailing list