Plonkathon 项目中 program.py 的 get_public_assignments 函数问题 #76
Answered
by
luckyyang
luckyyang
asked this question in
Q&A(提问题在隔壁~)
-
https://github.com/0xPARC/plonkathon/blob/main/compiler/program.py#L125
这个是做格式检查吗,还是做值的检查呢,var_name 为什么是 -1 呢 |
Beta Was this translation helpful? Give feedback.
Answered by
luckyyang
Apr 26, 2023
Replies: 1 comment
-
明白 python 的这个语法了,如果这样写 a = 3
b = {a: 3, "c": 2}
print(b) 输出: {3: 3, 'c': 2} var_name 会被替换成实际的值 加上双引号才表示是个 string,直接作为 object 的 key、 != 是两个 object 的 copy value 对比是否相等 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
luckyyang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
明白 python 的这个语法了,如果这样写
输出:
var_name 会被替换成实际的值
加上双引号才表示是个 string,直接作为 object 的 key、
!= 是两个 object 的 copy value 对比是否相等