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


Groups > comp.lang.python > #91861

Re: What use of string module?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'string.': 0.04; 'type,': 0.07; 'subject:module': 0.09; 'subject:string': 0.09; 'cc:addr :python-list': 0.10; 'template': 0.11; 'suggest': 0.15; '-tkc': 0.16; 'alphabet': 0.16; 'constants': 0.16; 'formatting,': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'inability': 0.16; 'omitting': 0.16; 'wrote:': 0.16; 'string': 0.17; '(or': 0.21; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'lawrence': 0.22; 'cc:no real name:2**0': 0.23; 'module': 0.23; 'header:In-Reply-To:1': 0.24; 'module.': 0.27; 'methods.': 0.29; 'strings,': 0.29; "i'd": 0.31; 'up.': 0.32; 'possibly': 0.32; 'subject:use': 0.33; 'subject:?': 0.34; 'lists': 0.34; 'useful': 0.35; 'functions.': 0.35; 'replaced': 0.35; 'received:10': 0.37; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'rather': 0.38; 'mark': 0.40; 'letters': 0.67; 'online': 0.71; 'received:162.253': 0.84; 'to:addr:yahoo.co.uk': 0.84; 'doubling': 0.91
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-MC-Relay Neutral
X-MailChannels-SenderId wwwh|x-authuser|tim@thechases.com
X-MailChannels-Auth-Id wwwh
X-MC-Loop-Signature 1433263149916:979373191
X-MC-Ingress-Time 1433263149915
Date Tue, 2 Jun 2015 11:39:30 -0500
From Tim Chase <python.list@tim.thechases.com>
To Mark Lawrence <breamoreboy@yahoo.co.uk>
Cc python-list@python.org
Subject Re: What use of string module?
In-Reply-To <mkj8ep$3v7$1@ger.gmane.org>
References <d3bf3182-d70e-4160-b600-733cbda748e6@googlegroups.com> <mkj8ep$3v7$1@ger.gmane.org>
X-Mailer Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AuthUser tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.72.1433263540.13271.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433263540 news.xs4all.nl 2935 [2001:888:2000:d::a6]:47445
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3729
X-Received-Body-CRC 2026098195
Xref csiph.com comp.lang.python:91861

Show key headers only | View raw


On 2015-06-02 04:37, Mark Lawrence wrote:
> > 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.
> 
> I suggest you don't bother, it's effectively dead having been
> replaced by string methods.

While most of the functions in the string module are obsoleted by the
methods on strings, I still find the constants useful to save myself
from my own inability to type, possibly omitting letters from the
alphabet or doubling them up.  I'd much rather just reference
string.printable than try to recreate it (or its kin) myself.

-tkc


Back to comp.lang.python | Previous | NextPrevious 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