python
2016-07-26 22:54
411 查看
class A(object): def __new__(cls,*args,**kwargs): print "in new" print "new %s" % cls return object.__new__(cls,*args,**kwargs) def __init__(self): print "init" A()
本文出自 “专注php” 博客,请务必保留此出处http://jingshanls.blog.51cto.com/3357095/1830449
相关文章推荐
- python 学习(十一)之字符串2
- python 学习(十) 之字符串 1
- Ubuntu16.04安装后开发环境配置和常用软件安装
- install pip3 for python 3.x
- python 学习(九) 之 continue语句
- Python 'ascii' codec can't encode character : ordinal not in range 问题解决
- 7. Reverse Integer [easy] (Python)
- python 学习(八)之 break 语句
- Python入门笔记(4)_ 控制流:条件判断和循环语句
- python简单爬虫爬取队列的实现
- python抓取知乎首页文本信息的简单实现
- 6. ZigZag Conversion [easy] (Python)
- Python 第十课,面向对象补足,异常处理
- Python 第九课,面向对象进阶
- 【Python】map、filter、reduce函数简介
- Python 培训之MySql
- python循环与判断
- [Python] 技术贴系列之——Django部署方案简介
- 【Python】基础学习——列表(list),元祖(tuple),字典(dict),字符串(string),集合(set)
- 1. Two Sum [easy] (Python)