Try the line
ret = [float(val) if val.isdigit() else val for val in ret.split()]
to replace the split and for loop in the request() function to see if it will work more efficiently and not have to catch exceptions.
🔈 Motivation
More efficient code.
🛰 Alternatives
There are probably alternatives but I'd have to think more and I don't want to.
Incorrect because values are decimals and contain +/- symbols. Exception statement can contain pass instead though to be slightly more efficient. Disregard rest.
🚀 Feature Request
Try the line
ret = [float(val) if val.isdigit() else val for val in ret.split()]
to replace the split and for loop in the request() function to see if it will work more efficiently and not have to catch exceptions.🔈 Motivation
More efficient code.
🛰 Alternatives
There are probably alternatives but I'd have to think more and I don't want to.
📎 Additional context