提交 d393c551 authored 作者: James Bergstra's avatar James Bergstra

added catch of TypeError... seems weird though

上级 cb2eaa61
...@@ -20,7 +20,7 @@ def canonicalize(name): ...@@ -20,7 +20,7 @@ def canonicalize(name):
def convert(x): def convert(x):
try: try:
return int(x) return int(x)
except ValueError: except (ValueError, TypeError):
return x return x
return map(convert, name) return map(convert, name)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论