This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients Trundle, abacabadabacaba, benhoyt, brian.curtin, christian.heimes, eric.araujo, giampaolo.rodola, gregory.p.smith, loewis, ncoghlan, neologix, nvetoshkin, pitrou, rhettinger, serhiy.storchaka, socketpair, terry.reedy, tim.golden, torsten, twouters, vstinner
Date 2013-05-05.09:23:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM0GEn=AQEkRvLCipGiKjG2gJFu6M0=u9e4w0HW1ej0WSw@mail.gmail.com>
In-reply-to <1367743996.81.0.0633756411816.issue11406@psf.upfronthosting.co.za>
Content
> We could document any platform-specific stuff, and places you'd users could get bitten. But can you give me an example of where the stat_result-with-st_mode-or-None approach falls over completely?

Well, that's easy:

size = 0
for name, st in scandir(path):
    if stat.S_ISREG(st.st_mode):
        size += st.st_size

> Agreed it can be an actual stat object, though.

Well, the nice thing is that we don't have to create yet another info
object, the downside is that it can be tricky, see above.

We can probably use the DTTOIF macro to convert d_type to st_mode.
History
Date User Action Args
2013-05-05 09:23:46neologixsetrecipients: + neologix, loewis, twouters, rhettinger, terry.reedy, gregory.p.smith, ncoghlan, pitrou, vstinner, giampaolo.rodola, christian.heimes, tim.golden, eric.araujo, Trundle, brian.curtin, benhoyt, torsten, nvetoshkin, abacabadabacaba, socketpair, serhiy.storchaka
2013-05-05 09:23:46neologixlinkissue11406 messages
2013-05-05 09:23:46neologixcreate