This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xnovakj
Recipients Malcolm Smith, eryksun, iritkatriel, lys.nikolaou, miss-islington, pitrou, serhiy.storchaka, xnovakj, xtreak
Date 2022-01-03.21:53:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thank you all for discussion and partial solution in latest Python versions and extending documentation.

For the future development of Python the initial question remains.
How to easy detect extensions for each file with standard python library function. Without programing own function to fix it.

Filenames with more dots could exist both in Unix and Windows worlds.
Nobody can't say (for example web app users). Please not use those files.

Python 3.10.1
Works fine:
>>> os.path.splitext('.some.jpg')
('.some', '.jpg')
>>> os.path.splitext('..some.jpg')
('..some', '.jpg')

Not usable:
>>> os.path.splitext('....jpg')
('....jpg', '')

There are some possible ways:
- new parametr
- new function
- change backward compatibility
- stay buggy forever

Thank you
Date User Action Args
2022-01-03 21:53:03xnovakjsetrecipients: + xnovakj, pitrou, serhiy.storchaka, eryksun, Malcolm Smith, lys.nikolaou, miss-islington, xtreak, iritkatriel
2022-01-03 21:53:03xnovakjsetmessageid: <>
2022-01-03 21:53:03xnovakjlinkissue34931 messages
2022-01-03 21:53:03xnovakjcreate