ulfsri / pyAlicat

Python API for acquisition and control of Alicat mass flow meters and controllers.
https://ulfsri.github.io/pyAlicat/
MIT License
0 stars 1 forks source link

Request function more efficient #84

Closed GraysonBellamy closed 6 months ago

GraysonBellamy commented 6 months ago

🚀 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

image

GraysonBellamy commented 6 months ago

Incorrect because values are decimals and contain +/- symbols. Exception statement can contain pass instead though to be slightly more efficient. Disregard rest.