Closed niknetniko closed 10 months ago
Maybe we should use a more explicit name then !v to improve readability.
Maybe we should use a more explicit name then !v to improve readability.
I went for !v to reduce clutter; e.g. if you have a string return value everywhere, that's a lot of times "value" will be there.
However, better readability is also something we want, so perhaps it is better to be explicit.
We now support both !v
and !value
Fixes #403.
This changes the DSL to have one attribute for return values:
return
. Then, to decide how to handle it:return
behaviour.Additionally, it introduces an additional tag,
!v
to explicitly mark a value as a YAML value. Some examples:return: 5
is a value, an intreturn: [5, "old"]
is a value, a listreturn: "{5, 5}"
is a string representation, thus a setreturn: !v "{5, 5}"
is a value, a stringreturn: !int8 5
is a value, an int8In most cases, this will make the test suites easier, as both statements, expressions, return values and oracle arguments all use the Python syntax by default.
This change is not backwards compatible. I'll need to go though the repositories to see where we must change usages:
return_raw
must becomereturn
.return
with a string or object need the tag!v
.