On 7/2/2019 12:56 PM, Terry Reedy wrote:
On 7/2/2019 12:16 AM, Glenn Linderman wrote:
On 7/1/2019 8:28 PM, Terry Reedy wrote:
I did not read much of the thread, but the proposal is to wrap a
near-trivial expression (2 operations) or replace a current method
call with a method call than is mo
On Tue, Jul 2, 2019 at 4:24 PM wrote:
> It seems to me that the desired behavior here is closest to
> 'str.replace()' out of all the options discussed, just with the constraint
> of being limited to either the start or the end of the string. (Thus the
> .lreplace() and .rreplace() option suggeste
On 7/2/2019 12:16 AM, Glenn Linderman wrote:
On 7/1/2019 8:28 PM, Terry Reedy wrote:
I did not read much of the thread, but the proposal is to wrap a
near-trivial expression (2 operations) or replace a current method
call with a method call than is more or less the same len as what it
replac
On 02Jul2019 0707, brian.sk...@gmail.com wrote:
Taking swapping a file extension as an example of a particular transformation of interest, it would
be achieved with something like s.replace(".htm", ".html", only_end=True).
Please don't use string functions for file system paths, they are not
It seems to me that the desired behavior here is closest to 'str.replace()' out
of all the options discussed, just with the constraint of being limited to
either the start or the end of the string. (Thus the .lreplace() and
.rreplace() option suggested by Glenn.)
The minimal change (which actua
thing like
s.replace(".htm", ".html", only_end=True).
-Brian
--
>
> Date: Tue, 2 Jul 2019 14:33:57 +1000
> From: Chris Angelico
> Subject: [Python-Dev] Re: strip behavior provides inconsistent r
On Tue, Jul 2, 2019 at 2:28 PM Glenn Linderman wrote:
>
>> A method could raise instead of returning the string as-is if the prefix is
>> not really a prefix. How often is this needed? The most common end
>> deletions are whitespace, which the current .strip handles correctly.
>
> raising woul
On 7/1/2019 8:28 PM, Terry Reedy wrote:
On 7/1/2019 1:57 PM, Chris Barker via Python-Dev wrote:
This was quite extensively discussed on python-ideas recently:
https://mail.python.org/archives/list/python-id...@python.org/thread/RJARZSUKCXRJIP42Z2YBBAEN5XA7KEC3/#WIRID57ESUFUAQQQ6ZUY2RK5PKQQYSJ3
On 7/1/2019 1:57 PM, Chris Barker via Python-Dev wrote:
This was quite extensively discussed on python-ideas recently:
https://mail.python.org/archives/list/python-id...@python.org/thread/RJARZSUKCXRJIP42Z2YBBAEN5XA7KEC3/#WIRID57ESUFUAQQQ6ZUY2RK5PKQQYSJ3
The claim of 'inconsistent results' is
This was quite extensively discussed on python-ideas recently:
https://mail.python.org/archives/list/python-id...@python.org/thread/RJARZSUKCXRJIP42Z2YBBAEN5XA7KEC3/#WIRID57ESUFUAQQQ6ZUY2RK5PKQQYSJ3
(I'm finding it hard to find a good thread view in the new interface -- but
that will get you star
Glenn Linderman wrote:
> On 6/27/2019 3:09 PM, Brett Cannon wrote:
> > My guess is that without Guido to just ask this will
> > have to go to a PEP as it changes a built-in.
> > How does adding two new methods change a built-in?
> > Now if an extra parameter were added to modify lstrip, rstrip, and
On 6/28/2019 10:10 AM, MRAB wrote:
On 2019-06-28 03:40, Glenn Linderman wrote:
On 6/27/2019 3:09 PM, Brett Cannon wrote:
My guess is that without Guido to just ask this will have to go to a
PEP as it changes a built-in.
How does adding two new methods change a built-in?
Now if an extra parame
On 2019-06-28 03:40, Glenn Linderman wrote:
On 6/27/2019 3:09 PM, Brett Cannon wrote:
My guess is that without Guido to just ask this will have to go to a PEP as it
changes a built-in.
How does adding two new methods change a built-in?
Now if an extra parameter were added to modify lstrip, rs
On 6/27/2019 3:09 PM, Brett Cannon wrote:
My guess is that without Guido to just ask this will have to go to a PEP as it
changes a built-in.
How does adding two new methods change a built-in?
Now if an extra parameter were added to modify lstrip, rstrip, and strip
to make them do something di
On Jun 27, 2019, at 15:27, Jelle Zijlstra wrote:
> El jue., 27 jun. 2019 a las 11:51, escribió:
>> excellent and extraordinarily obvious
>>
>> Thanks for the pointer.
>>
>> a bit unfortunate that old docs for a module that doesn't seem to exist in
>> py3 with less clear but still correct words
My guess is that without Guido to just ask this will have to go to a PEP as it
changes a built-in.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/pyt
El jue., 27 jun. 2019 a las 11:51, escribió:
> excellent and extraordinarily obvious
>
> Thanks for the pointer.
>
> a bit unfortunate that old docs for a module that doesn't seem to exist in
> py3 with less clear but still correct words is still the top google result
> for python string strip.
>
excellent and extraordinarily obvious
Thanks for the pointer.
a bit unfortunate that old docs for a module that doesn't seem to exist in py3
with less clear but still correct words is still the top google result for
python string strip.
https://docs.python.org/2/library/string.html#string.ls
On 06/27/2019 07:34 AM, dan@bauman.space wrote:
Anyone experienced anything like this?
This list is for the development /of/ Python, not development /with/ Python.
In the future, please take such questions to, for example, Python List*.
--
~Ethan~
* https://mail.python.org/mailman/listinf
On Fri, Jun 28, 2019 at 01:08:45AM +1000, Chris Angelico wrote:
> Help on built-in function lstrip:
[...]
> This does NOT remove a leading substring. It removes a set of characters.
This is a re-occurring painpoint and gotcha. I've fallen for it myself.
I really think it's long past time we bite
String strip methods take a set of characters to strip, not a specific
string / character sequence. They remove ALL the characters in that set
from the left or right until the first character which is not in the set.
This can be simply demonstrated here:
>>> "foobar".strip("f")
'oobar'
>>> "fooba
On Fri, Jun 28, 2019 at 1:02 AM wrote:
>
> Anyone experienced anything like this?
>
> The behavior seems consistent but unexpected.
>
> python 3.6 on both windows (10) and linux (ubuntu 18.04) seem to exhibit the
> same odd behavior.
>
> something about a docker-image looking string seems to trig
22 matches
Mail list logo