A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024730.html below:

[Python-Dev] deprecating string module?

[Python-Dev] deprecating string module? [Python-Dev] deprecating string module?Greg Ewing greg@cosc.canterbury.ac.nz
Fri, 31 May 2002 12:39:38 +1200 (NZST)
Guido van Rossum <guido@python.org>:

> > This is funny. In the C++ community there's a nearly unanimous
> > consensus that way too much of the functionality of the standard
> > strings is expressed as member functions.
> 
> Interesting.  Python used to have the same attitude, hence the string
> module -- but the existence of multiple string types made methods more
> attractive.

I don't understand how using methods makes multiple
string types easier to deal with.

Suppose I want to define my own string-like type. How
do I arrange things so that " ".join(x) does the right
thing when x contains instances of my new type? How
is this made easier by the fact that join is a method
of " " rather than a free function?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4