[Python-ideas] PEP 428 and is_file [was Re: PEP: Extended stat_result (First Draft)]

Chris Angelico rosuav at gmail.com
Tue May 7 17:18:02 CEST 2013


On Tue, May 7, 2013 at 8:46 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> It may not be detrimental to the code, but it is to the user (at least to me
> ;).  If the path doesn't exist, it's obviously not a file.

+1. It makes good sense. Though it probably won't help your argument
to point out that shell scripts enjoy the same feature - see 'man 1
test' [1] - where "-f" means "exists and is a file", "-x" means
"exists and is executable", etc.

[1] eg http://unixhelp.ed.ac.uk/CGI/man-cgi?test

ChrisA



More information about the Python-ideas mailing list