Message257398
Yes, it's what I mean. Add methods close, __enter__ and __exit__ to the iterator. The scandir iterator is not just iterator, it is like file object.
And as in file object, we perhaps have to emit a ResourceWarning in the destructor if close() or __exit__() were not called. |
|
Date |
User |
Action |
Args |
2016-01-03 06:31:51 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, benhoyt |
2016-01-03 06:31:51 | serhiy.storchaka | set | messageid: <1451802711.13.0.65815497815.issue25994@psf.upfronthosting.co.za> |
2016-01-03 06:31:51 | serhiy.storchaka | link | issue25994 messages |
2016-01-03 06:31:50 | serhiy.storchaka | create | |
|