def convert(self, value, param, ctx):
try:
if isinstance(value, (int,)):
return value
else:
return int(value, 0)
except:
self.fail('%s is not a valid value' % value, param, ctx)
# Create instances of custom argument types
评论列表
文章目录