Author serhiy.storchaka
Recipients benhoyt, gvanrossum, haypo, martin.panter, serhiy.storchaka
Date 2016-01-14.22:34:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452810899.49.0.721343351307.issue25994@psf.upfronthosting.co.za>
In-reply-to
Content
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 ...
History
Date User Action Args
2016-01-14 22:34:59serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, haypo, benhoyt, martin.panter
2016-01-14 22:34:59serhiy.storchakasetmessageid: <1452810899.49.0.721343351307.issue25994@psf.upfronthosting.co.za>
2016-01-14 22:34:59serhiy.storchakalinkissue25994 messages
2016-01-14 22:34:59serhiy.storchakacreate