[Python-ideas] str.rreplace
spir
denis.spir at gmail.com
Tue Jan 28 09:40:54 CET 2014
On 01/28/2014 05:03 AM, Andrew Barnert wrote:
>> >(A shorter key word would be nice, but I can't think of any that is as
>> >clear.)
> Why does it have to be -1/0/1 instead of just True/False?
>
> In which case we could use "reverse", the same name that's already used for similar things in other methods like list.sort (and that's implied in the current names "rfind", etc.).
(Again, here there is no reversal, but backwards iteration; in list.sort, there
is reversal. I'd vote for making all such methods use a logical param, if it did
not break code [because eg rfind is used], on the line:
l.find(it, backwards=False)
or a shorter param name.
)
d
More information about the Python-ideas
mailing list