Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91814

Re: What use of string module?

From Laura Creighton <lac@openend.se>
Subject Re: What use of string module?
References <d3bf3182-d70e-4160-b600-733cbda748e6@googlegroups.com>
Date 2015-06-02 11:39 +0200
Newsgroups comp.lang.python
Message-ID <mailman.49.1433237983.13271.python-list@python.org> (permalink)

Show all headers | View raw


In a message of Mon, 01 Jun 2015 19:14:18 -0700, fl writes:
>Hi,
>
>I read the online help about string. It lists string constants, string 
>formatting, template strings and string functions. After reading these,
>I am still puzzled about how to use the string module. 
>
>Could you show me a few example about this module?
>
>Thanks

A long time ago, strings didn't have the methods they had now.
So the string module was created, so that people could all have
a common way to do some really common things that people like
to do with strings.  Now the strings have object methods to
do the same thing, so you don't really want to use it.

It's there for backwards compatibility.  You don't want all the
code that exists out there and uses it to all stop working one
day because we now have a better way to do it. :)

Laura

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What use of string module? fl <rxjwg98@gmail.com> - 2015-06-01 19:14 -0700
  Re: What use of string module? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-02 04:37 +0100
  Re: What use of string module? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-02 17:21 +1000
  Re: What use of string module? Laura Creighton <lac@openend.se> - 2015-06-02 11:39 +0200
  Re: What use of string module? Tim Chase <python.list@tim.thechases.com> - 2015-06-02 11:39 -0500

csiph-web