
On Sun, Mar 22, 2020 at 1:02 PM Nathaniel Smith <njs@pobox.com> wrote:
On Sat, Mar 21, 2020 at 11:35 AM Steven D'Aprano <steve@pearwood.info> wrote:
On Fri, Mar 20, 2020 at 06:18:20PM -0700, Nathaniel Smith wrote:
On Fri, Mar 20, 2020 at 11:54 AM Dennis Sweeney <sweeney.dennis650@gmail.com> wrote:
This is a proposal to add two new methods, ``cutprefix`` and ``cutsuffix``, to the APIs of Python's various string objects.
The names should use "start" and "end" instead of "prefix" and "suffix", to reduce the jargon factor
Prefix and suffix aren't jargon. They teach those words to kids in primary school.
Whereas they don't have to teach "start" and "end", because kids already know them before they start school.
Why the concern over "jargon"? We happily talk about exception, metaclass, thread, process, CPU, gigabyte, async, ethernet, socket, hexadecimal, iterator, class, instance, HTTP, boolean, etc without blinking, but you're shying at prefix and suffix?
Yeah. Jargon is fine when there's no regular word with appropriate precision, but we shouldn't use jargon just for jargon's sake. Python has a long tradition of preferring regular words when possible, e.g. using not/and/or instead of !/&&/||, and startswith/endswith instead of hasprefix/hassuffix.
Given that the word "prefix" appears in help("".startswith), I don't think there's really a lot to be gained by arguing this point :) There's absolutely nothing wrong with the word. But Dennis, welcome to the wonderful world of change proposals, where you will experience insane amounts of pushback and debate on the finest points of bikeshedding, whether or not people actually even support the proposal at all... ChrisA