统计

留言簿(1)

DB

Others

QA

Tech Website

阅读排行榜

评论排行榜

Python

【转】Python的标准logging模块
     摘要: Programmers can configure logging either by creating loggers, handlers, and formatters explicitly in a main module with the configuration methods listed above (using Python code), or by creating a logging config file. The following code is an example of configuring a very simple logger, a console handler, and a simple formatter in a Python module:

  阅读全文

posted @ 2011-08-12 14:49 XXXXXX 阅读(1203) | 评论 (0)  编辑

Special Methods for Customizing Classes
     摘要: C.__init__(self[, arg1, ...] )
Constructor (with any optional arguments)

C.__new__(self[, arg1, ...] )[a]
Constructor (with any optional argu ments); usually used for setting up subclassing of immutable data types

C.__del__(self)
Destructor

C.__str__(self)
Printable string representation; str() built-in and print statement

C.__repr__(self)
Evaluatable string representation; repr() built-in and '' operator

  阅读全文

posted @ 2011-07-21 23:25 XXXXXX 阅读(243) | 评论 (0)  编辑

学习Python的好网站

posted @ 2011-06-17 20:26 XXXXXX 阅读(4374) | 评论 (2)  编辑

Python中的Closure

posted @ 2011-06-15 07:31 XXXXXX 阅读(1299) | 评论 (0)  编辑