摘要: What is __init__.py usedfor?http://effbot.org/pyfaq/what-is-init-py-used-for.htmFiles named __init__.py are used to mark directories on disk as a Python package directories. If you have the filesmydir/spam/__init__.pymydir/spam/module.pyandmydiris on your path, you can import the code in module.py a 阅读全文
posted @ 2011-05-20 05:33 bettermanlu 阅读(283) 评论(0) 推荐(0) 编辑
摘要: How to use *args and **kwargs in Pythonhttp://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/Or,How to use variable length argument lists in Python.The special syntax,*argsand**kwargsin function definitions is used to pass a variable number of arguments to a function. The singl 阅读全文
posted @ 2011-05-20 04:13 bettermanlu 阅读(227) 评论(0) 推荐(0) 编辑