Message188434
> 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. |
|
Date |
User |
Action |
Args |
2013-05-05 09:23:46 | neologix | set | recipients:
+ 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:46 | neologix | link | issue11406 messages |
2013-05-05 09:23:46 | neologix | create | |
|