[Python-Dev] backporting string changes to 2.2.3
11 Apr 2003 10:25:21 +0200
As this is my first message on this development list I'll introduce
myself, I am a hardware designer in a new french startup Arteris which
is developping MicroElectronics IP cores. I'm responsible for
development of EDA tools, ie software to design and validate hardware
designs. For this purpose we've been developping a EDA design plateform
enterily in Python (with Python-C parts for the core database) for about
14 months. This plateform is being actively used for about three months
and is working well.
Now I'd like to give some help in developing Python, using my own
experience to try to improve this great language.
I'll start simple here, (we've got other great ideas, but i'll expose
them here when there will be some kind of first draft).
On string objects there is a find and rfind, a lstrip and rstrip, but
there is no rsplit function, is there a reason why there isn't, or is
this only because nobody implement it ? ( in this case I'll propose a
patch in a few days). I'm mainly using it for
'toto.titi.tata'.rsplit('.',1) -> 'toto.titi','tata' as our internal
database representation is quite like a logical filesystem.
Boris Boutillier - email@example.com
On Fri, 2003-04-11 at 00:50, Neal Norwitz wrote:
> Just in case anybody missed it the first several times,
> there were several inconsistencies in the string methods/functions.
> This checkin should make everything consistent for 2.3.
> I'm planning to backport these string changes to 2.2.3.
> The reason is that methods on string objects already have the
> changes, only doc is being updated. The string module has
> the change for strip, but not lstrip/rstrip, and UserString
> doesn't have any.
> Modified Files:
> Doc/lib/libstring.tex: 1.49
> Lib/UserString.py: 1.17
> Lib/string.py: 1.68
> Lib/test/string_tests.py: 1.31
> Objects/stringobject.c: 2.208
> Objects/unicodeobject.c: 2.187
> Log Message:
> Attempt to make all the various string *strip methods the same.
> * Doc - add doc for when functions were added
> * UserString
> * string object methods
> * string module functions
> 'chars' is used for the last parameter everywhere.
> These changes will be backported, since part of the changes
> have already been made, but they were inconsistent.
> Python-Dev mailing list