Commit 8bf5ea70 authored by Benjamin Peterson's avatar Benjamin Peterson

backport change from trunk

parent c5959630
......@@ -1776,6 +1776,8 @@ order (MRO) for bases """
# Safety test for __cmp__
def unsafecmp(a, b):
if not hasattr(a.__class__, "__cmp__"):
return
try:
a.__class__.__cmp__(a, b)
except TypeError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment