def _parse_x_y(_x, _y):
try:
x = Decimal(_x)
y = Decimal(_y)
except (InvalidOperation, TypeError, ValueError):
try:
x = cast_date(_x)['date']
y = cast_date(_y)['date']
except (ValueError, KeyError, IndexError, TypeError):
x, y = _x, _y
return x, y
评论列表
文章目录