Comments (4)
Yeah thinking more about it, I don't think it's worth the extra complexity at this point. As you point out, we'd probably have to add buffering and modify the coroutine transactions to get it to work. I'd suggest implementing the simpler version you outlined above; we can revisit some of the more complex options like this if there's sufficient demand.
from ion-python.
Hey I think I have a decent solution to this. Before I write tests, is this an appropriate pretty print representation? (indentation amount is configurable):
(venv) ~/repos/ion-python$ python ex.py
# input
{a: [4, yes::hello::2, (b (a c))], b: z::7} x [4]
# output
$ion_1_0
{
'a': [
4,
'yes'::'hello'::2,
(
'b'
(
'a'
'c'
)
)
],
'b': 'z'::7
}
'x'
[
4
]
from ion-python.
Yes, that looks pretty good. I think it would be nice to have some way to keep small containers on a single line. For example,
[4]
is arguably more readable than
[
4
]
from ion-python.
Agreed that [4]
would look better. Hrmmm. I'll see if I can do that simply.
The approaches I can think of require buffering some of the stream/generator (perhaps the first two or three elements) until I can determine whether a container is "small" or not. Is it acceptable to buffer some of the ion_event stream instead of yielding all data for a given ion_event immediately?
from ion-python.
Related Issues (20)
- ion-python-benchmark-cli's threshold value need to be more accurate. HOT 2
- ion-python-benchmark-cli's format conversion shouldn't always copy the input file
- Benchmark CLI `compare` can have inaccurate results for some metrics
- Ion Python Benchmark results display with "false precision"
- Decide which Python interpreters should be included in the performance testing workflow
- Pydantic support HOT 3
- Some IonPyDict Methods Behave Like Python 2 Dict
- 4 tests in `test_benchmark_cli.py` failed. HOT 1
- Ion Python's documentation needs to be improved HOT 1
- Improving IonPyObject Construction
- Soft-fail on ImportError when importing c libs HOT 1
- DEPRECATION: amazon.ion is being installed using the legacy 'setup.py install' method HOT 1
- Benchmark results report doesn't support `tabulate` on Windows.
- GHA windows build test doesn't work with python 3.8
- Improve Python Error Handling from ioncmodule
- Symbols lack SIds when C-extension is enabled HOT 2
- Benchmark-cli `IO-type=buffer` should support benchmarking multiple top_level objects
- Benchmark-cli protobuf multiple top level objects use case HOT 1
- Test Pipeline need to support the latest python version 3.12
- Segmentation Fault when issuing multiple `loads` HOT 1
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 ion-python.