Enum Class method with default Enum value fails
问题 I am well aware that if you have a class method that uses the enum's class name for type hinting, there is a hack to get it to work for Python 3.6 and below. Instead of... class Release(Enum): ... @classmethod def get(cls, release: Release): ... You need to use the string value like so... class Release(Enum): ... @classmethod def get(cls, release: "Release"): ... I believe in Python 3.7 and above there is a pythonic way around this "hack" where you don't have to use quotes. The reason is