首页 > 编程语言 > 详细

Python - 命名空间和作用域

时间:2018-05-22 17:07:53      阅读:199      评论:0      收藏:0      [点我收藏+]

参考

  1. https://blog.csdn.net/sakurainluojia/article/details/72783752
  2. https://docs.python.org/3.6/tutorial/classes.html

概念

技术分享图片

A scope is a textual region of a Python program where a namespace is directly accessible. “Directly accessible” here means that an unqualified reference to a name attempts to find the name in the namespace.

即可以在静态的作用域(本质是一段文本)中访问动态的命名空间(解释器启动时创建)

Python - 命名空间和作用域

原文:https://www.cnblogs.com/allen2333/p/9072899.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!