Open casperdcl opened 5 years ago
The -y
option allows for json/yaml input which includes expanded types. There is some oddities with literal eval in older versions of python (e.g. '1+1' is valid in python < 3.7). But otherwise it'd probably be fine to add that capability to -p
. We'd want to be clear about such a change if we did it and bump to 1.1 as I'm pretty sure a number of users weren't aware of -y and pass json then json parse on the other end, and we'd want a minor version bump before changing that behavior.
-p
seems to imply literal evaluation rather than raw string (-r
), thus it should useast.literal_eval()
Example
Current behaviour
Desired output
Any reason why this should not be the case?