是否可以在 Python 中重载++ 运算符?
最佳答案
Python 中没有++
运算符(也没有'--')。递增通常使用 +=
运算符代替。
关于python - 是否可以在 Python 中重载++ 运算符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/774784/
是否可以在 Python 中重载++ 运算符?
最佳答案
Python 中没有++
运算符(也没有'--')。递增通常使用 +=
运算符代替。
关于python - 是否可以在 Python 中重载++ 运算符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/774784/