Given that "1" and "0" are valid true and false expressions according to the conditions, I think it makes sense to allow coercion of the "1" and "0" strings to True and False.
This ONLY affects coercion when bool is explicitly passed to it. It's as small a change as possible.
Description
Exactly as the title says.
Given that "1" and "0" are valid true and false expressions according to the conditions, I think it makes sense to allow coercion of the "1" and "0" strings to
True
andFalse
.This ONLY affects coercion when
bool
is explicitly passed to it. It's as small a change as possible.This supports the work in https://github.com/ros2/launch/pull/649 and will be used to support the boolean substitution implementations.
Tests
Special note: This means that one test for the type coercion will no longer apply.
Beyond that, relevant tests have been implemented.