[Python-Dev] PEP 292, Simpler String Substitutions
Greg Ward
gward@python.net
Thu, 20 Jun 2002 09:49:05 -0400
On 20 June 2002, Fredrik Lundh said:
> > No, that's already checked in as textwrap.py.
>
> are you saying that you cannot rename stuff under CVS?
> not even delete it, and check it in again under a new name?
Not at all -- I was just correcting Andrew's misunderstanding about
where the text-wrapping code lives (for now).
> I'm +1 on adding a text utility module for occasionally useful
> stuff like wrapping, getting rid of gremlins, doing various kinds
> of substitutions, centering/capitalizing/padding and otherwise
> formatting strings, searching/parsing, and other fun stuff that
> your average text editor can do (and +0 on using the existing
> "string" module for that purpose, but I can live with another
> name).
Sounds like a pretty good idea to me.
Note that textwrap.py is almost 300 lines, which in my worldview is big
enough to warrant its own module. I don't think that reduces the
desirablity of having text.py (or text/__init__.py and friends) for all
the things you mentioned.
Greg
--
Greg Ward - Python bigot gward@python.net
http://starship.python.net/~gward/