I think you're getting to implementation details here. Whether a new
string is returned or a reference to the old one is an optimization
decision. I don't think it's worth legislating this behavior one way
or another (especially since it's mostly a theoretical issue).
--Guido
On 5/26/06, Walter D
Guido van Rossum wrote:
> On 5/26/06, Walter Dörwald <[EMAIL PROTECTED]> wrote:
> [...]
>> And what happens if the separator is an instance of a subclass?
>>
>> class s2(str):
>> def __repr__(self):
>> return "s2(%r)" % str(self)
>>
>> print "foobar".partition(s2("o"))
>>
>> Currently t
Raymond Hettinger wrote:
> 1) Is str.rpartition() still wanted?
>
> Yes.
I might have missed my earlier 30-minute deadline with one minute (not
my fault! I was distracted! seriously!), but this time, I actually
managed to get the code in there *before* I saw the pronouncement ;-)
_
> 1) Is str.rpartition() still wanted?
Yes.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
On 5/26/06, Walter Dörwald <[EMAIL PROTECTED]> wrote:
> A.M. Kuchling wrote:
>
> > I didn't find an answer in the str.partition() thread in the archives
> > (it's enormous, so easy to miss the right message), so I have two
> > questions:
> >
> > 1) Is str.rpartition() still wanted?
Can't remember.
A.M. Kuchling wrote:
> I didn't find an answer in the str.partition() thread in the archives
> (it's enormous, so easy to miss the right message), so I have two
> questions:
>
> 1) Is str.rpartition() still wanted?
>
> 2) What about adding partition() to the re module?
And what happens if the s
I didn't find an answer in the str.partition() thread in the archives
(it's enormous, so easy to miss the right message), so I have two
questions:
1) Is str.rpartition() still wanted?
2) What about adding partition() to the re module?
--amk
___
Python