Is except: ... pass bad style?

JCM joshway_without_spam at myway.com
Thu Sep 9 22:14:07 CEST 2004


Peter Otten <__peter__ at web.de> wrote:
...
> If the class of myobj is under your control you could do

> class MyObj:
>     def method(self): 
>         pass

> and then later just call

> myobj.method() 

Yes.  This also avoids running into trouble by catching an exception
you didn't mean to ignore.



More information about the Python-list mailing list