sre_constants MODIFIED CLASS - ERROR

נתי שטרן nsh531 at gmail.com
Fri Jun 24 04:43:19 EDT 2022


class _NamedIntConstant(int):
    def __new__(cls, value, name):
        self = super(_NamedIntConstant, cls).__new__(cls, value)
        self.name = name
        return self

    def __repr__(self):
        return self.name

    __reduce__ = None
 MAXREPEAT = _NamedIntConstant(32,name=str(32))

what's the problem with the code????


More information about the Python-list mailing list