相关疑难解决方法(0)

obj .__ closure__中究竟包含了什么?

Beazley第100页提到:

>>>python.__closure__
(<cell at 0x67f50: str object at 0x69230>,)
>>>python.__closure__[0].cell_contents
Run Code Online (Sandbox Code Playgroud)

我的理解是这__closure__是一个列表但是这些单元格和str对象是什么?这看起来像一个单元组?

python closures python-internals

34
推荐指数
2
解决办法
6748
查看次数

标签 统计

closures ×1

python ×1

python-internals ×1