Message258239
If scandir() is implemented as native Python generator (see for example issue25911), it could easily be converted to context manager:
def scandir(path):
return contextlib.closing(native_scandir(path))
def native_scandir(path):
...
yield ... |
|
Date |
User |
Action |
Args |
2016-01-14 22:34:59 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, vstinner, benhoyt, martin.panter |
2016-01-14 22:34:59 | serhiy.storchaka | set | messageid: <1452810899.49.0.721343351307.issue25994@psf.upfronthosting.co.za> |
2016-01-14 22:34:59 | serhiy.storchaka | link | issue25994 messages |
2016-01-14 22:34:59 | serhiy.storchaka | create | |
|