toml format #2127
andrewgsavage
started this conversation in
Ideas
toml format
#2127
Replies: 2 comments 2 replies
-
First ... awesome! This will be perfect for next release (In April) as Python 3.11+ (as given NEP29) supports TOML out of the box. I like the way it looks. I wonder if we should write a converter script to help users migrate and allow Pint to drop support for the older parser and format. |
Beta Was this translation helpful? Give feedback.
2 replies
-
I had worked on this back in the day here was the format with retrocompatibility with the string format: And you could also use the same keys as the Definition dataclasses as it would get the same key with the toml load command. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have started writing a toml writer and parser. This is the format I have at present:
I have used the same attribute names as the defintion statements. Could/should these be renamed to something clearer?
I have quoted everything as strings. In some places numbers could be set to floats or ints, but I think for a first version it's best to stay similar to the .txt file and have them parsed the same way.
It's much longer as you'd expect. The 800 line file has become 3200 lines!
Beta Was this translation helpful? Give feedback.
All reactions