Python 面向對象高階-----metaclass

Python 面向對象高階-----metaclass    前言  類也是對象,既然類是對象,那就自然是某個東西的實例化,這個東西就是type 首先看下type是怎麼回事 type type最常用的方法就是查看類型,這只是他的基礎用法罷了 >>> print(type(1)) <type 'int'> >>> print(type("1")) <type 'str'> >>> print(typ
相關文章
相關標籤/搜索