I notice that a pre-increment/decrement operator can be applied on a variable (like ++count
).
(我注意到可以将预增/减运算符应用于变量(例如++count
)。)
It compiles, but it does not actually change the value of the variable! (它可以编译,但实际上并不会改变变量的值!)
What is the behavior of the pre-increment/decrement operators (++/--) in Python?
(Python中预增/减运算符(++ /-)的行为是什么?)
Why does Python deviate from the behavior of these operators seen in C/C++?
(为什么Python会偏离C / C ++中看到的这些运算符的行为?)
ask by Ashwin Nanjappa translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…