- 博客(5)
- 收藏
- 关注
原创 decorator to count the call
class decorator: class tracer0: def __init__(self, func): self.calls = 0 self.func = func def __call__(self, *args): self.calls += 1 print("call %s to %s" % ...
2018-04-27 17:02:34 238
原创 python learning notes
PART I in new-style class, implicit attribute fetch starts at class instead of instance. X[I] is equivalent to X.__getitem__(I) in old-style class. X[I] is equivalent to type(X).__getitem__(X, I) i...
2018-04-19 11:19:21 308
原创 execution of Linux commands in Python.
1. os.system out = os.system(command_to_use) This is implemented by calling the Standard C function system(), and has the same limitations. the return value is the exit status of the process enc...
2018-04-16 18:19:15 261
转载 refactoring in python[note 1]
note taking from online video course: https://www.safaribooksonline.com/library/view/refactoring-in-python why we should refactor our code? improve readability reduce time to find bugs to make l...
2018-04-03 12:22:49 288
原创 learning avocado [simple test]
use avocado list to get tests list. # avocado list Error running method "configure" of plugin "vt": argument --vt-config: conflicting option string(s): --vt-config Error running method "configur...
2018-04-02 15:55:53 362
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人