Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Makes sure that pillar formats decimals according to the decimal mark defined by the user with the
OutDec
option (as described inhelp("options")
).I was in doubt whether I should have added any sort of validation to OutDec. I initially wrote it to default to
.
in EN locales and,
in certain European locales, and to accept the OutDec value only if it was a character and length 1. I figured the length was especially important given how pillar deals with screen width. I assumed base would also have such checks. However, out of curiosity I set OutDec to "potato" to see how the base print function would deal with it, and indeed it printed0.1
as[1] 0potato1
. Why should I take that away from users?So, I didn't add the length requirement, but I imagine you would like to do that, as well as add some sort of type validation. Regardless, the important thing is that pillar respects the
OutDec
option.Best regards.