,hence both are aliasesprint b # output: 2
b、a1都有相同的id,但删除一个并不会影响'del' on a subscription deletes the actual object,not the name object binding的other.Python引用状态。输出: 1,3,4,5证明了这个statement
在与python装饰器的实验中,我得到了一个超出我理解的结果:,它与内部函数、闭包、赋值有关。decorator1(myfunc)decorator2(myfunc)decorator1(myfunc)并低于输出cache id = 7696547350000inner1 id = 7696544290144
我的问题是1为什么在Bl