Blame tests/run/r_hordijk1.pyx

Packit Service 99d393
__doc__ = """
Packit Service 99d393
  >>> try:
Packit Service 99d393
  ...     s = Spam()
Packit Service 99d393
  ... except KeyError, e:
Packit Service 99d393
  ...     print("Exception: %s" % e)
Packit Service 99d393
  ... else:
Packit Service 99d393
  ...     print("Did not raise the expected exception")
Packit Service 99d393
  Exception: 'This is not a spanish inquisition'
Packit Service 99d393
"""
Packit Service 99d393
Packit Service 99d393
import sys
Packit Service 99d393
if sys.version_info[0] >= 3:
Packit Service 99d393
    __doc__ = __doc__.replace("Error, e", "Error as e")
Packit Service 99d393
Packit Service 99d393
cdef extern from "Python.h":
Packit Service 99d393
    ctypedef class __builtin__.list [object PyListObject]:
Packit Service 99d393
        pass
Packit Service 99d393
Packit Service 99d393
cdef class Spam(list):
Packit Service 99d393
    def __init__(self):
Packit Service 99d393
        raise KeyError("This is not a spanish inquisition")