[Python-ideas] PEP 428 and is_file [was Re: PEP: Extended stat_result (First Draft)]
Ethan Furman
ethan at stoneleaf.us
Tue May 7 17:58:04 CEST 2013
On 05/07/2013 08:18 AM, Chris Angelico wrote:
> 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.
Not at all! If `stat.is_file` returns True it must exist and it must be a file! ;)
--
~Ethan~
More information about the Python-ideas
mailing list