[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri Jun 9 23:11:17 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1094
--- Comment #74 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
ahhh... this may have been a misunderstanding
current:
class ListVisitor(Visitor):
@contextlib.contextmanager
def __call__(self, node):
if isinstance(node, Record):
print(node.name)
yield node
below is much better and readable, and it is a really beneficial
part of the API
yesterday(?):
class ListVisitor(Visitor):
@contextlib.contextmanager
def Record(self, node):
print(node.name)
yield node
was there a technical reason to make this change?
when i was referring to use of isinstance, i was referring to the
(now decoupled) database-walking-function, not the visitors.
(now called Dataclass.walk)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list