pflag
pflag copied to clipboard
Print Default Values of String-to-String in Sorted Order
Motivation
Issue 362 reported by @SOF3
Changes
Sort keys before stringifying string-to-string flag values.
Summary
String-to-string default values in usage would print in sorted order of keys.
Eg. --foo stringToString usage (default [a=b,c=d])
In the example as per #362, now, the order will be always default [a=b,c=d]
Related Issues
Closes #362
what about string to other types like integers?
what about string to other types like integers?
Yes, there are another 2 places. Let this PR be a PoC. We can have set of issue-PR to address those.
- String to int
- String to int64