[Python-ideas] PEP: Extended stat_result (First Draft)

Andrew Barnert abarnert at yahoo.com
Tue May 7 01:07:45 CEST 2013


On May 6, 2013, at 15:09, Jim Jewett <jimjjewett at gmail.com> wrote:

> Out of curiosity, is it common to call more than function, except in
> the following cases:
> 
> (1) stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode)
> (2) try all the type functions until successful
> 
> If those are the only real use cases, it might make sense to just add
> a pair of functions for those two specific cases.

(3) DIR or LNK
(4) REG or LNK

I think the former is even more common than (1).




More information about the Python-ideas mailing list