[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Mon Jun 19 09:16:18 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1094
--- Comment #179 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Dmitry Selyutin from comment #176)
> If the method just prints the value with the relevant indent, what'd be the
> output?
ok, i'll have it print before the contextmanager yield.
i'll include the path too, so you can see all the relevant inputs.
(In reply to Jacob Lifshay from comment #171)
> (In reply to Dmitry Selyutin from comment #170)
>
> i'm imagining that visiting {("a", 1): 3.4, 2: {5, 6}} would do the
> following visitor calls, more or less:
{("a", 1): 3.4, 2: {5, 6}} path=[]
dict_entry(("a", 1), 3.4) path=[("a", 1)]
("a", 1) path=[("a", 1), 0]
"a" path=[("a", 1), 0, 0]
1 path=[("a", 1), 0, 1]
3.4 path=[("a", 1), 1]
dict_entry(2, {5, 6}) path=[2]
2 path=[2, 0]
{5, 6} path=[2, 1]
5 path=[2, 1, 5]
6 path=[2, 1, 6]
(In reply to Jacob Lifshay from comment #172)
> @dataclass()
> class A:
> a: int
> b: "list[int]"
>
> visiting {3: A(5, [12, 3])} would do:
{3: A(5, [12, 3])} path=[]
dict_entry(3, A(5, [12, 3])) path=[3]
3 path=[3, 0]
A(5, [12, 3]) path=[3, 1]
5 path=[3, 1, "a"]
[12, 3] path=[3, 1, "b"]
12 path=[3, 1, "b", 0]
3 path=[3, 1, "b", 1]
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list