[Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator (original) (raw)
Benjamin Peterson benjamin at python.org
Fri Jun 27 02:35:21 CEST 2014
- Previous message: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator
- Next message: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jun 26, 2014, at 17:07, Paul Sokolovsky wrote:
With my MicroPython hat on, os.scandir() would make things only worse. With current interface, one can either have inefficient implementation (like CPython chose) or efficient implementation (like MicroPython chose) - all transparently. os.scandir() supposedly opens up efficient implementation for everyone, but at the price of bloating API and introducing heavy-weight objects to wrap info. PEP calls it "lightweight DirEntry objects", but that cannot be true, because all Python objects are heavy-weight, especially those which have methods.
Why do you think methods make an object more heavyweight? namedtuples have methods.
- Previous message: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator
- Next message: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]