Closed Rayn0r closed 8 months ago
Just use a list- since that argument expects a list of "parameters" and a list of one is fine. There's no sense in changing the command
method, since it's not really for end users.
The approach here - I guess - would be to add a set_humidity
function to the underlying class that hides this little detail.
Calling set_humidity will fail when an
int
object is passed to thecommand
function. It works great forset_baseline
with two arguments, but does not if you pass a single one.My first attempt for a function to calculation the absolute humindity in g/m³ looks like this(it works in python 2.7, 3.4 and 3.9.0 here):
The relevant part of my test_script looks like this:
Upon calling it, I get:
Calling it with a list object, makes it work:
How can it be fixed, so that one can pass an
int
to set_humidity?André