什么是语法保留?
What is a syntax holdover?
我对编程还比较陌生,我一直在阅读一些堆栈溢出问题的答案,并且在评论中提到了语法保留。我到处搜索这些是什么,但我没有找到它们是什么。
这是我找到这个术语的 link:
Difference between del, remove and pop on lists
保持不是一个技术术语。它有一个简单的字典 definition.
a person or thing surviving from an earlier time
但是,在给定的 SO 评论中,该词使用不正确。而保留是保留(不变)的东西,@jxramos 用它来表示被删除或修改的东西,恰恰相反。
评论似乎是想说,"I thought del
was a Python 2 keyword that was changed, but it still works in Python 3." 回复是,“del
没有改变,就像 return
等”
我对编程还比较陌生,我一直在阅读一些堆栈溢出问题的答案,并且在评论中提到了语法保留。我到处搜索这些是什么,但我没有找到它们是什么。
这是我找到这个术语的 link: Difference between del, remove and pop on lists
保持不是一个技术术语。它有一个简单的字典 definition.
a person or thing surviving from an earlier time
但是,在给定的 SO 评论中,该词使用不正确。而保留是保留(不变)的东西,@jxramos 用它来表示被删除或修改的东西,恰恰相反。
评论似乎是想说,"I thought del
was a Python 2 keyword that was changed, but it still works in Python 3." 回复是,“del
没有改变,就像 return
等”