Commit 5f1f8795 authored by Stefan Behnel's avatar Stefan Behnel

Fix metaclass usage in cpdef-enums by using the Py3 syntax (which is also more efficient).

parent dc9a9649
......@@ -20,8 +20,7 @@ cdef class __Pyx_EnumMeta(type):
# @cython.internal
cdef object __Pyx_EnumBase
class __Pyx_EnumBase(int):
__metaclass__ = __Pyx_EnumMeta
class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
def __new__(cls, value, name=None):
for v in cls:
if v == value:
......
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