我已经在Python中看到并使用了嵌套函数,它们与闭包的定义相匹配.那他们为什么叫nested functions而不是closures?
nested functions
closures
嵌套函数是不是闭包,因为它们不被外部世界使用?
更新:我正在阅读关于闭包的内容,这让我想到了关于Python的这个概念.我在下面的评论中搜索并找到了某人提到的文章,但我无法完全理解该文章中的解释,所以这就是我提出这个问题的原因.
python closures nested-function
closures ×1
nested-function ×1
python ×1