Closed neighthan closed 4 years ago
E.g. Optional[float]=None. Define a new "type" function so that we can handle the input - if it's "None", return None, otherwise return float(inp) (or whatever type was used instead of float).
Optional[float]=None
"None"
None
float(inp)
float
Fixed by 921589ec952f74cacb44009709b5a06c1432e4f9.
E.g.
Optional[float]=None
. Define a new "type" function so that we can handle the input - if it's"None"
, returnNone
, otherwise returnfloat(inp)
(or whatever type was used instead offloat
).