[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Jun 18 20:40:52 BST 2023


--- Comment #168 from Dmitry Selyutin <ghostmansd at gmail.com> ---
(In reply to Jacob Lifshay from comment #167)
> (In reply to Dmitry Selyutin from comment #166)
> > dicts and dataclasses,
> dataclasses/namedtuples should just visit the field values and not tuples of
> name/value combinations (except for path tracking)
> imho dicts can recursively walk key/value pairs or just values -- at the
> choice of the visitor/walker?

Yielding name along with the value is exactly path tracking. Plus, we iterate
over collections, and just values do not really resemble dataclass in the same
way just keys or just values don't resemble dict.
This is not the same with set/list/similar. You don't really need an index to
construct the collection. That said, I've been thinking of yielding index
exactly for path tracking (though this is of no use with sets).

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list