Todd wrote: I'm in favor of most of these additions. I was a heavy user of path.py and I'm missing those "advanced" features in pathlib.
> 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. One remark about this : .tar.gz files are the exception rather than the rule, and AFAIK maybe the only one ? It's pretty common to have dots in filenames instead of blanks for example, and stem does the right thing here : '/data/my.little.file.txt'. There is also the case of hidden files on Linux, what do you expect for /home/toto/.program.cfg ? _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/JFPYPS2KA22DIXUTVPOOEQQ6NAHR23CV/ Code of Conduct: http://python.org/psf/codeofconduct/