cpython/Lib/test/crashers/coerce.py

10 lines
181 B
Python
Raw Normal View History

# http://python.org/sf/992017
class foo:
def __coerce__(self, other):
return other, self
if __name__ == '__main__':
foo()+1 # segfault: infinite recursion in C