Georg Brandl added the comment:
As seen from the __eq__ example, the exception should be SyntaxError.
With both changes, it works fine again in r60142.
As for why the test is there, maybe the operator functions had lax error
checking once.
--
nosy: +georg.brandl
resolution: -> fixed
st
New submission from Antoine Pitrou:
In test_operator we find the following lines:
class C(object):
def __getattr(self, name):
raise SyntaxError
self.failUnlessRaises(AttributeError,
operator.attrgetter('foo'), C())
Obviously "__getattr" has no effect.