实现枚举:
def enum(**enums): return type(‘Enum‘, (), enums) DsUrls = enum( ds_create=‘ds/create‘, ds_delete=‘ds/delete‘, ds_info=‘ds/info‘, ds_list=‘ds/list‘, ds_modify=‘ds/modify‘, ds_sync=‘ds/sync‘, ds_connect=‘ds/conn‘, task_status=‘task/status‘ ) print DsUrls.ds_create
时间: 2024-10-07 13:05:18