python工厂函数

转帖:https://my.oschina.net/yusi/blog/514567 所谓工厂函数就是指这些内建函数都是类对象, 当你调用它们时,其实是建立了一个类实例。 工厂函数: int(),long(),float(),complex(),bool() str(),unicode(),basestring() list(),tuple():生成列表或者元组 type():查看类型 dict(
相关文章
相关标签/搜索