Skip to content

增加新方法 #49

@maiyajj

Description

@maiyajj

class SecretEnum(TupleEnum):
SECRET = "secret", "敏感"
NO_SECRET = "no_secret", "非敏感"

@ classmethod
def member_items(cls) -> Dict:
return cls._value2member_map_

>>>print(SecretEnum.member_items())
>>>{'secret': <SecretEnum.SECRET: 'secret'>, 'no_secret': <SecretEnum.NO_SECRET: 'no_secret'>}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions