
Python
文章平均质量分 80
yxc135
此用户很懒,没有任何简介
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
weakref的使用场景——实现缓存
The weakref module allows the Python programmer to create weak references to objects. In the following, the term referent means the object which is referred to by a weak reference. A weak re转载 2013-07-18 11:22:39 · 2878 阅读 · 1 评论 -
Communication between Processes in Python
Reprint: As with threads, a common use pattern for multiple processes is to divide a job up among several workers to run in parallel. Effective use of multiple processes usually requires some com转载 2013-08-21 21:01:13 · 1172 阅读 · 0 评论 -
super() in Python
Reprint:http://rhettinger.wordpress.com/2011/05/26/super-considered-super/ Much has been written about super() and much of that writing has been a failure. This article seeks to improve on the situ转载 2013-08-21 19:52:38 · 1091 阅读 · 0 评论 -
Property in Python
Reference:http://adam.gomaa.us/blog/2008/aug/11/the-python-property-builtin/ I used a question that involved property as one of the interview questions during a recent developer search, and I fou转载 2013-08-21 13:34:44 · 898 阅读 · 0 评论 -
Decorator in Pyhton
找了一篇关于Decorator的文章,虽然有点小问题,但在如何应用的方面写的比较好。具体的小问题我会在文章中间用红色字标注一下。 The Python programming language has an interesting syntactic feature called a decorator. Let's use an example in order to explain转载 2013-08-20 22:29:03 · 877 阅读 · 1 评论 -
Multiprocessing Basics in Python
Reprint:http://pymotw.com/2/multiprocessing/basics.html The simplest way to spawn a second is to instantiate a Process object with a target function and call start() to let it begin working.转载 2013-08-21 16:31:32 · 1206 阅读 · 0 评论 -
Metaclass in Python
I pick this post from stackoverflow, it's really awesome, thanks for e-satis . Here is the original link : http://stackoverflow.com/questions/100003/what-is-a-metaclass-in-python Classes转载 2013-08-21 22:40:51 · 819 阅读 · 0 评论 -
Descriptors in Python
Reference:http://www.informit.com/articles/printerfriendly.aspx?p=1309289 Python descriptors have been around a long time—they were introduced way back in Python 2.2. But they're still not widely u转载 2013-08-21 13:36:26 · 998 阅读 · 0 评论 -
Python中__del__如何使用
从C++转行Python的人可能会认为__del__等价于C++中的Destructor,但同时会发现一些很奇怪的问题,比如在__del__中使用类变量时遇到 Exception AttributeError: "'NoneType' object has no attribute '***'" 的问题。 通过查阅资料,发现__del__不是一般意义上的Destructor,不推荐使原创 2013-07-18 10:59:22 · 8427 阅读 · 0 评论 -
Threading in Python
Reprint:http://pymotw.com/2/threading/ Thread Objects The simplest way to use a Thread is to instantiate it with a target function and call start() to let it begin working. import threa转载 2013-08-21 14:56:53 · 1770 阅读 · 0 评论