Grant Edwards <[EMAIL PROTECTED]> wrote: > try: > myobj.feature1() > except AttributeError: > print "object doesn't implement feature1" > >isn't correct, since an unhandled AttributeError generated by >the feature1 method will print "object doesn't implement >feature1".
I'd be tempted to argue that it *was* correct, since the object doesn't implement a feature1 which can be used. (This is the cue for someone to talk about making sure that myobj's class has been thoroughly unit tested.) -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ "Frankly I have no feelings towards penguins one way or the other" -- Arthur C. Clarke her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- http://mail.python.org/mailman/listinfo/python-list