On Wed, Oct 30, 2019 at 11:55 PM Oz Tiram <[email protected]> wrote: > > Hi Steve, > > Thanks for your reply. While dataclass provide a cleaner API than DictRow > (you can access `row.id` instead of `row["id"]`). > However, dataclass still use the built in `__dict__` instead of `__slots__`. > > This means that the users reading large files won't see the suggested memory > improvements. >
FWIW, there is memory improvements thanks to the Key-sharing dictionary. See PEP 412 [1]. I have an idea about utilizing Key-sharing dictionary in DictReader, but I have not implemented it yet. [1]: https://www.python.org/dev/peps/pep-0412/ _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/R4XMTCZKTJG32HJYTIZO7XJQMJBJMWQ3/ Code of Conduct: http://python.org/psf/codeofconduct/
