Re:Glom – Restructured Data for Python
by emidln on Thursday May 10, 2018 @01:35AM
(#17036628)
Objects are overkill. Use an iterable of getitem lookups. They compose easily and don’t have much overhead (cpu or cognitive). From the library I use at work, inspired by clojure.core/get-in, it would look like this:
By using __getitem__ you naturally work with anything in the python ecosystem.
[ Parent
| on HN ]
There are no comments on this comment yet.