PY: use upper bound instead of lower bound.
PY: fixed constexpr usage.