Python字典有一个名为^{}的C API函数。但是docstring相当稀疏:
int PyDict_ClearFreeList()
Clear the free list. Return the total number of freed items.
New in version 3.3.
这个函数没有参数,所以它(可能)与任何特定的字典无关。在
它返回一个int
。这看起来很奇怪,因为这表明它引用了某种C状态,因为python“类”总是有一个Py_ssize_t
大小。在
那么这个“免费名单”到底是什么呢?在
Tags:
您是正确的,自由列表与任何特定的字典无关;事实上,它适用于许多数据类型(例如^{} )。在
空闲列表是Python保存它可以放置东西的空闲位置的列表,即包含不再使用的对象的内存,但是它还没有释放回全局Python内存池或系统。在
每this useful Theano tutorial:
相关问题 更多 >
编程相关推荐