
June 27, 2014
12:35 a.m.
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.