1 描述 __sizeof__() : 打印系统分配空间的大小 2 示例 def fun(): pass print(fun.__sizeof__()) 运行 112 转载于:https://www.cnblogs.com/gengyi/p/8045774.html