why and when we should do it?

Swaroop C H swaroopch at gmail.com
Tue Mar 29 21:13:30 EST 2005


On Wed, 30 Mar 2005 09:38:28 +0800, Su Wei <pollux.suwei at gmail.com> wrote:
> hi,everybody,Sorry to bother you.
> why and when we should add the keyword "pass" ?

You can use the 'pass' keyword to indicate an empty block. For example,

if True:
    pass

pass is usually used as a placeholder so that you can add code later.

> why and when we should inherit Object?

You can inherit from Object if you want to have a 'new-style class'.
See http://www.python.org/doc/newstyle.html

-- 
Swaroop C H
Blog: http://www.swaroopch.info
Book: http://www.byteofpython.info



More information about the Python-list mailing list