Jan Novak <xnov...@users.sourceforge.net> added the comment:

Yes, dot behaviour is well documented.

But splitext() is a function to split name and extension, not take care about 
hidden files.

Hidden files starting with dot is Unix like system feature.
https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory

Hidden files could have also extension.
Try for example create/rename .somename.jpg file in Ubuntu.
It is normal image with .jpg extension. You could open it etc.

You can't use standard python splitext() function to detect extension.

I know that change this standard python function is probably imposible due to 
backward compatibility. Bud extend it with new parameter could be possible. The 
change in 2007 was unfortunate/incomplete.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34931>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to