On 31.12.20 15:32, Todd wrote:
5. Stem with no suffixes The stem property only takes off the last suffix, but even in the example given ('my/library.tar.gz') it isn't really useful because the suffix has two parts ('.tar' and '.gz'). I suggest another property, probably called "rootstem" or "basestem", that takes off all the suffixes, using the same logic as the "suffixes" property. This is another symmetry issue: it is possible to extract all the suffixes, but not remove them.+1 Does anybody rely of this behavior of ".stem"? It always seemed odd to me but that might be because of the use-cases I work with. So, another possibility would be to fix "stem" to do what makes sense.This is a backwards compatibility break and I don't want to get into the complications of doing that. There is really no benefit to breaking backwards compatibility. I would strongly suspect renaming a method then making a new, completely different method with the same name is not going to happen.
I disagree that breaking compatibility has no benefit. The benefit is always long-term but I understand that you don't want to go through deprecating and re-adding the same name.
One concern I have is that "rootsteam" or "basestem" is not really a well-defined concept (as was "stem" when it was added - at least the multiple suffix concept was there but has little influence on the naming of the stem concept).
We already have concepts like: basename << rightmost part of a path root << toplevel node of a tree; also filesystem
The burden is just too high relative to the benefits.
What exactly is the burden? Best Sven
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/OEATQWHWKD5WLZDBGILLRVLHBKEGE7JE/ Code of Conduct: http://python.org/psf/codeofconduct/
