(no subject)
Gerrit Holl
gerrit.holl at pobox.com
Fri Feb 25 01:54:39 EST 2000
<quote name="Tim Peters" date="951429366">
> [Def P]
> > ...
> > I still don't understand the benefit of string methods
> > over oldfashioned string functions...
>
> The string functions aren't going away, so feel free to ignore string
> methods if they don't appeal to you.
Aren't they becoming obsolete? Won't the string be deprecated?
Not sure what's the difference ;)
> At heart, I think they were driven by the upcoming introduction of a new
> Unicode string type. Python 1.6 no longer has *a* string type, it's got
> two. Viewing the various string operations as abstract methods on a variety
> of concrete string types is natural and appealing, while (possibly) adding a
> pile of new string *functions* that work sensibly *only* on Unicode strings
> (e.g., titlecase, byte-order mark fiddling, who knows?) would be unnatural
> and unappealing. Special methods in a subclass are natural.
Where can I find more info on those Unicode strings, except in the source?
Will they be mutable (I don't think so)? What methods do *they* have?
> Using string methods certainly "looks different" at first, but the
> implementation has been available for several months (in the CVS development
> tree), and people who have *used* string methods uniformly report that they
> quickly come to like them (btw, "space.join(list)" is gorgeous!).
> So give 'em a try, or stop whining <wink>.
Hmmmmmmmmmmmmmm...
> in-the-end-guido-is-simply-mysterious-ly y'rs - tim
Indeed, I find [].sort() very irritating and often have this
function defined:
def sortlist(l, *args):
apply(l.sort, args)
return l
regards,
Gerrit.
--
Comparison Python GUI's: http://www.nl.linux.org/~gerrit/gui.html
Please comment!
More information about the Python-list
mailing list