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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Jun 7 02:07:49 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1094

--- Comment #49 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
https://github.com/python/cpython/blob/2.7/Lib/HTMLParser.py

forget the actual html-parsing, search for instances "handle_"
in that code, and notice that HTMLParser *itself* performs
the recursive-descent walking but does not expect the *handler*
functions to do - or have any control over, or get involved with -
the *act* of walking.

there is no need at all in the *visitor* functions to perform
"self.visit(somesubnode" or even worse "for child in thing self.visit(child)"

i know i am emphasising it a lot, it's hard to express, but i
feel that "actions taken on {thing}" should be completely
separate from "act of tree-walking".

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


More information about the libre-soc-bugs mailing list