[issue30971] Improve code readability of json.tool

2017-07-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

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.

--
nosy: +rhettinger
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30971] Improve code readability of json.tool

2017-07-19 Thread Berker Peksag

Berker Peksag added the comment:

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:

# Output JSON
with options.outfile as outfile:
json.dump(obj, outfile, sort_keys=options.sort_keys, indent=4)
outfile.write('\n')

IMO, the only acceptable change is the correct use of 'default' parameter for 
'infile' and 'outfile'.

--
nosy: +berker.peksag
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30971] Improve code readability of json.tool

2017-07-19 Thread R. David Murray

R. David Murray added the comment:

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 :)

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30971] Improve code readability of json.tool

2017-07-19 Thread Daniel Himmelstein

New submission from Daniel Himmelstein:

In https://github.com/python/cpython/pull/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:

+ https://github.com/python/cpython/pull/345 to add indentation / whitespace 
options (bpo-29636).

+ https://github.com/python/cpython/pull/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.

--
components: Library (Lib)
messages: 298686
nosy: dhimmel
priority: normal
pull_requests: 2824
severity: normal
status: open
title: Improve code readability of json.tool
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com