Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>:
--
pull_requests: +232
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Daniel Himmelstein:
The utility of `python -m json.tool` would increase if users could specify the
indent level.
Example use case: newlines in a JSON document are important for readability and
the ability to open in a text editor. However, if the file is large, you can
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>:
--
pull_requests: +298
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>:
--
pull_requests: -230
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Daniel Himmelstein added the comment:
For discussion on how to implement this, see
+ https://github.com/python/cpython/pull/201#discussion_r102146742
+ https://github.com/python/cpython/pull/201#discussion_r102840190
+ https://github.com/python/cpython/pull/201#discussion_r102891428
Daniel Himmelstein added the comment:
@serhiy.storchaka I totally understand the desire to keep json.tool simple.
However, given the description of json.tool in the documentation (below), I
think an indentation option is within scope:
> The json.tool module provides a simple command l
Daniel Himmelstein added the comment:
@bob.ippolito thanks for pointing to jq as a reference implementation. I
updated the pull request (https://git.io/vS9o8) to implement all of the
relevant options. Currently, the PR supports the following mutually exclusive
arguments:
--indent
--no-indent
Daniel Himmelstein added the comment:
To recap the discussion from https://git.io/vyCY8: there are three potential
mutually exclusive command line options that have been suggested. There are as
follows.
```python
import json
obj = [1, 2]
print('--indent=4')
print(json.dumps(obj, indent=4
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>:
--
pull_requests: +2778
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>:
--
pull_requests: +2779
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
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
New submission from Daniel Himmelstein <daniel.himmelst...@gmail.com>:
The documentation for the lzma module currently contains 6 examples
(https://docs.python.org/3.6/library/lzma.html#examples). However, it does not
include an example to XZ compress a file on disk. The functionali
Change by Daniel Himmelstein <daniel.himmelst...@gmail.com>:
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
type: -> enhancement
___
Python tracker <rep...@bugs.python.org>
<https://bugs.
Daniel Himmelstein <daniel.himmelst...@gmail.com> added the comment:
> we could consider an API addition
Just brainstorming here... perhaps an API addition would be most appropriate in
the shutil module (https://docs.python.org/3.6/library/shutil.html) which
already
Change by Daniel Himmelstein <daniel.himmelst...@gmail.com>:
--
pull_requests: +5593
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Daniel Himmelstein added the comment:
Any reason not to also expose mtime in the gzip.open API?
--
nosy: +dhimmel
___
Python tracker
<https://bugs.python.org/issue34
Daniel Himmelstein added the comment:
I am interested in shlex.join as a way to log subprocess.CompletedProcess.args
as a string that users could run in their terminals. I initially assumed that
this was also the scope of shlex.join. However, it seems that shlex.join does
not accept all
Daniel Himmelstein added the comment:
Since opening this issue, I've encountered several additional instances where
indentation control would have been nice. I don't agree that jq is a sufficient
substitute:
1. jq is generally not pre-installed on systems. For projects where users
Change by Daniel Himmelstein :
--
pull_requests: +16961
pull_request: https://github.com/python/cpython/pull/17482
___
Python tracker
<https://bugs.python.org/issue29
19 matches
Mail list logo