摘要:
1.__sizeof__与len的区别>>> a = range(3)>>> a.__sizeof__()24>>> len(a)3>>> a.__sizeof__.__doc__'__sizeof__() -> int\nsize of object in memory, in bytes' 阅读全文
摘要:
>>> def f_1(): print("I am f_1")>>> def f_2(): print("I am f_2") >>> f1 = f_1>>> f2 = f_2>>> f1.__code__<code object f_1 at 0x00FFB840, file "<pyshell#31>", line 1>>>> f2.__code__<code object f_2 at 0x 阅读全文
摘要:
1.__qualname__A dotted name showing the “path” from a module’s global scope to a class, function or method defined in that module, as defined inPEP 3155. For top-level functions and classes, the qualified name is the same as the object’s name:一个显示从从定义该对象的模块到到达该对象(类,函数,方法)所经路径的带.号的名字?对于top-level的类和方法 阅读全文