Comments (4)
It has nothing to do with JSON, I do not think that such link is relevant. It can even cause confusion, because the subset of Python syntax is compatible with JSON, this can look like suggestion to use pprint
to produce JSON.
from cpython.
I think the number of people who use json to print out python objects, who would also read the json documentation and find a pprint reference to do something sort of (but not really) related is very, very small. I don't think this should be added.
from cpython.
JSON is not only used for storing data, it's also used for displaying information in human readable form, we even have an example of that in the documentation. I have messed around with custom JSON encoders while there's a module that supports them out of the box. This is precisely why it would have been useful to link to that module. And like shown above, using it to print a list of lists doesn't work well.
I didn't search for a different way to do it, because I already knew json, which works in most cases. But in others I had to use a for loop.
from cpython.
Let me know if you change your mind.
from cpython.
Related Issues (20)
- Simplify Windows write I/O around consoles on Windows 8+
- LoongArch to Tier 3 HOT 2
- Use *.pyi stub files as source for the inspect.signature() HOT 6
- Thread sanitizer tests failing in GitHub actions HOT 5
- test_pyrepl: test_inspect_keeps_globals_from_inspected_file() fails on s390x Fedora 3.x HOT 1
- Code object creation (const interning) can mutate tuples
- Missing audit events for `python -i` and `python -m asyncio` HOT 1
- The mod(modulo) calculation with `complex` values gets the wrong error message saying 'complex' and 'float' instead of 'complex' and 'complex' HOT 2
- test_makefile_test_folders test failures on python 3.12
- Add option to functools.update_wrapper()/@wraps to copy the coroutine flag
- Improve and reorganise ``pyspecific``
- test_pyrepl: test_inspect_keeps_globals_from_inspected_* are very flaky
- `statistics.mode` fails for unhashable data HOT 8
- Make Memory-Related Tests Less Fragile
- Env Variable to Auto-Name and Recognize __pycache__ As .__pycache__
- csv module: Missing test case for an invalid quoting value
- `test_pyrepl` is taking 1 hour on refleaks buildbots HOT 3
- Using custom OpenSSL version 3.x when compiling Python 3.x - fails HOT 1
- Introduce configure --disable-openssf-guide or --enable-openssf-guide HOT 17
- Fully implement PEP 706: Change default filter for TarFile.extract() and extractall() to 'data'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.