datalad
datalad copied to clipboard
`EnsureInt()` as parameter constraint sometimes too unspecific
Example: --recursion-limit uses EnsureInt, but likely would not be happy to receive a -234 as a value.
Given the ambiguity, a GUI input widget can also not infer an adequate input range.
likely we want to add optional min and max attributes
Well OP was correct, but also not well informed. The desired constraint is easily possible with built-in tools:
(EnsureInt() & EnsureRange(min=0)) | EnsureNone()