python - 为什么在 Python 中说 x = x?

标签 python identity equals

this file ,在函数 cross_from_below(x, threshold) 中,有一行说 threshold = threshold。这条线有什么意义?这与没有此命令的情况有什么不同吗?

最佳答案

该作业没有意义。它可能只是遗留下来的,应该被移除。下一个功能几乎相同,但没有。

关于python - 为什么在 Python 中说 x = x?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1809805/

相关文章:

java - 乘法表

web - 在 CMS(Wordpress 和 phpBB)之间共享登录信息

java - equals 方法在 java 中不起作用。硬件

python - 在命令行中 cap.isOpened() 时返回状态

python - 在django中进行单元测试时出现"auth_user does not exist"

python - 使用 operator.itemgetter 对字典进行排序

python - 隐藏 scikit-learn ConvergenceWarning : "Increase the number of iterations (max_iter) or scale the data"

asp.net-mvc - 自定义 WIF 请求验证器无限循环

domain-driven-design - DDD,值对象和ORM

string - 在 Scala 中使用 '==' 代替 equals 进行字符串比较