标签:
实现枚举:
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
标签:
原文地址:http://my.oschina.net/yulongjiang/blog/385709