"Su Wei" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >i hvae seen some code like this before:
I really hope not... >class BusinessBO : dev __init__(slef): #write you own code here dev businessMethod : #write you own code here That is 'def', not 'dev' >pass This is completely useless at top (unindented) module level >why and when we should add the keyword "pass" ? When you need it to avoid a syntax error. That is when you want a 'do-nothing' suite. One example: def f(): pass >and some time i have seen >class SomeObject(Object) : #some code >why and when we should inherit Object? That is 'object', not 'Object'. It makes the class new style instead of old style. Unless you inheret from another new-style class, which does the same, I would advise always unless you specifically know you want an old-style class. Another pass example: class stuff(object): pass. The difference between o=object() and s=stuff() is that you can add attributes to s but not to o. Terry J. Reedy PS: posting plain ascii text, which this is not, makes responding easier -- http://mail.python.org/mailman/listinfo/python-list