
On Tue, Mar 24, 2020 at 2:53 PM Ethan Furman <ethan@stoneleaf.us> wrote:
On 3/24/2020 3:30 PM, Steve Dower wrote:
On 24Mar2020 1849, Brett Cannon wrote:
-1 on "cut*" because my brain keeps reading it as "cute". +1 on "trim*" as it is clear what's going on and no confusion with
On 03/24/2020 01:37 PM, Eric V. Smith wrote: preexisting methods.
+1 on "remove*" for the same reasons as "trim*".
And if no consensus is reached in this thread for a name I would assume the SC is going to ultimately decide on the name if the PEP is accepted as the burden of being known as "the person who chose _those_ method names on str" is more than any one person should have bear. ;)
-1 on "cut*" (feels too much like what .partition() does) -0 on "trim*" (this is the name used in .NET instead of "strip", so I foresee new confusion) +1 on "remove*" (because this is exactly what it does)
I think name choice is easier if you write the documentation first: cutprefix - Removes the specified prefix. trimprefix - Removes the specified prefix. stripprefix - Removes the specified prefix. removeprefix - Removes the specified prefix. Duh. :)