I starting g reading this thread in the middle, on a phone.
But was very confused for a while because I didn’t notice that there
were two ‘r’s at the beginning of .rreplace
Just sayin’
-CHB
Sent from my iPhone
> On Jul 19, 2018, at 9:29 AM, Paul Moore wrote:
>
>> On 19 July 2018 at 16:25,
On 19 July 2018 at 16:25, Eric V. Smith wrote:
> It currently does something: it replaces all instances, just as if you
> hadn't supplied a count (see my example below). You can't change its
> behavior.
... without a deprecation cycle. Which is of course not worth it for
something which could
On 7/19/2018 11:22 AM, Calvin Spealman wrote:
If its treated as a missing parameter, and currently doesn't do
anything, then it wouldn't be used... right? and it could be safe to add
behavior for it... right?
It currently does something: it replaces all instances, just as if you
hadn't
On 2018-07-19 16:22, Calvin Spealman wrote:
If its treated as a missing parameter, and currently doesn't do
anything, then it wouldn't be used... right? and it could be safe to add
behavior for it... right?
Are you sure that it wouldn't break some existing code?
Plus, we already have
If its treated as a missing parameter, and currently doesn't do anything,
then it wouldn't be used... right? and it could be safe to add behavior for
it... right?
On Thu, Jul 19, 2018 at 11:17 AM, Eric V. Smith wrote:
> On 7/19/2018 10:01 AM, Calvin Spealman wrote:
>
>> As an alternative
On 7/19/2018 10:01 AM, Calvin Spealman wrote:
As an alternative suggestion: What if the count parameter to
str.replace() counted from the right with negative values? That would be
consistent with other things like indexing and slicing.
We couldn't make this change because negative values
It would be consistent to apply it to other functions and I'd be in favour
of that, yes.
On Thu, Jul 19, 2018 at 10:06 AM, Eric Fahlgren
wrote:
> On Thu, Jul 19, 2018 at 7:01 AM Calvin Spealman
> wrote:
>
>> As an alternative suggestion: What if the count parameter to
>> str.replace() counted
On Thu, Jul 19, 2018 at 7:01 AM Calvin Spealman wrote:
> As an alternative suggestion: What if the count parameter to str.replace()
> counted from the right with negative values? That would be consistent with
> other things like indexing and slicing.
>
That could certainly be made to work, but
As an alternative suggestion: What if the count parameter to str.replace()
counted from the right with negative values? That would be consistent with
other things like indexing and slicing.
On Thu, Jul 19, 2018 at 9:47 AM, Eric Fahlgren
wrote:
> On Wed, Jul 18, 2018 at 8:20 PM Graham Gott com>
On Wed, Jul 18, 2018 at 8:20 PM Graham Gott
wrote:
>
> Thoughts? Support/oppose?
>
+1, along with an overall rework of str methods to make them more
consistent.
The find, replace and split families should all gain the same
tuple-as-search-string that endswith and startswith use. (Discussed
This was previously proposed here in 2014 <
https://mail.python.org/pipermail/python-ideas/2014-January/025091.html>,
but the discussion fizzled out. To me, str.rreplace() is an obvious and
necessary complement to str.replace(), just as str.rsplit() is a complement
to str.split(). It would make
11 matches
Mail list logo