[issue40271] Allow shell like paths in

Serhiy Storchaka report at bugs.python.org
Thu Apr 16 12:38:47 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

If add such option to zipfile.is_zipfile(), why not add it to other functions? There are many tens or hundreds of functions and methods in the stdlib which accept a file path. Adding such option to all of them is not practical. And zipfile.is_zipfile() does not look special.

Also, there are other options which you may want to add to zipfile.is_zipfile(). What about expandvars()? Or support URIs with the file:/// scheme? Or maybe someone want to replace ~ with the project directory instead of the home directory.

It is better to provide functions for every tiny feature and combine them as you want than add an infinite number of options to all functions.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40271>
_______________________________________


More information about the Python-bugs-list mailing list