[Python-ideas] pathlib suggestions

Thomas Kluyver thomas at kluyver.me.uk
Wed Jan 25 11:04:00 EST 2017


On Wed, Jan 25, 2017, at 03:54 PM, Todd wrote:

> Those [.tar.foo] are just examples that I encounter a lot, there can
> be other cases where multiple extensions are used.


The real issue is that there's no definition of what an extension is.
You can have dots anywhere in a filename, and it's not at all unusual
for them to be used before the bit we recognise as the extension.
Almost every package on PyPI has files named like 'pip-9.0.1.tar.gz',
but '.0.1.tar.gz' clearly doesn't make any sense as an extension.
Without a good definition of what the 'full extension' is, we can't
have code to find it.


Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170125/f5d685b9/attachment.html>


More information about the Python-ideas mailing list