You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #2720, I propose code changes to the json.tool command line utility. These changes are entirely non-functional and instead focus on improving code readability, style, brevity, extensibility, and maintainability.
These changes mainly came up during the implementation of two enhancements of json.tool:
+ #345 to add indentation / whitespace options (bpo-29636).
These issues and pull requests are currently awaiting further consensus around their design and desirability. Therefore, I wanted to separate the non-functional code improvements from these PRs into a distinct PR.
This has the benefit of allowing the future enhancement PRs to focus solely on adding features rather than the readability changes.
However, our general policy is that we don't make such changes unless we are also touching the code for other reasons. So I think using this PR as a base for your feature PRs, and then committing everything together if they are accepted, would be the way to go. I don't know if it would work to actually use it as a base for the other PRs in github, or if it would work better to just make it the initial commit in a commit series. The github workflow is too new for us to have definite answers to such questions :)
I don't think most of the changes improve readability of json.tool. Everyone has their own preferences and it's usually not enough to justify code churn.
Also, we don't need to add comments when the code itself is pretty descriptive:
Activity
dhimmel commentedon Jul 19, 2017
In #2720, I propose code changes to the json.tool command line utility. These changes are entirely non-functional and instead focus on improving code readability, style, brevity, extensibility, and maintainability.
These changes mainly came up during the implementation of two enhancements of json.tool:
+ #345 to add indentation / whitespace options (bpo-29636).
+ #201 to display non-ascii characters (bpo-27413).
These issues and pull requests are currently awaiting further consensus around their design and desirability. Therefore, I wanted to separate the non-functional code improvements from these PRs into a distinct PR.
This has the benefit of allowing the future enhancement PRs to focus solely on adding features rather than the readability changes.
bitdancer commentedon Jul 19, 2017
However, our general policy is that we don't make such changes unless we are also touching the code for other reasons. So I think using this PR as a base for your feature PRs, and then committing everything together if they are accepted, would be the way to go. I don't know if it would work to actually use it as a base for the other PRs in github, or if it would work better to just make it the initial commit in a commit series. The github workflow is too new for us to have definite answers to such questions :)
berkerpeksag commentedon Jul 19, 2017
I don't think most of the changes improve readability of json.tool. Everyone has their own preferences and it's usually not enough to justify code churn.
Also, we don't need to add comments when the code itself is pretty descriptive:
IMO, the only acceptable change is the correct use of 'default' parameter for 'infile' and 'outfile'.
rhettinger commentedon Jul 21, 2017
I concur with the other commenters and am marking this as closed.
Thank you for the effort to contribute. May I suggest working on one the many open bug reports.