Skip to content

Add remaining TOML types to tomllib conversation table documentation #113234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ryan-duve opened this issue Dec 17, 2023 · 1 comment · Fixed by #113236
Closed

Add remaining TOML types to tomllib conversation table documentation #113234

ryan-duve opened this issue Dec 17, 2023 · 1 comment · Fixed by #113236
Labels
docs Documentation in the Doc dir

Comments

@ryan-duve
Copy link
Contributor

ryan-duve commented Dec 17, 2023

Documentation

The conversion table for Python's TOML parser does not contain entries for two types listed on the TOML specification:

  1. inline table (dict)
  2. array of tables (list of dicts)

Adding those entries to the conversion table will make it more clear how the objects are represented in Python when using tomllib.load.

Linked PRs

@ryan-duve ryan-duve added the docs Documentation in the Doc dir label Dec 17, 2023
@AlexWaygood AlexWaygood changed the title Add remaining TOML types to tomllib conversation table documenntation Add remaining TOML types to tomllib conversation table documentation Dec 17, 2023
@encukou
Copy link
Member

encukou commented Dec 18, 2023

+1. I can see that users who don't realize that inline table is semantically the same as table might be confused, and perhaps think tomllib doesn't implement the full spec.
There's value in matching the TOML spec, and technically-redundant entries won't hurt. (For sufficiently advanced users, all of the table falls under “common sense", anyway...)

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 19, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 19, 2023
encukou pushed a commit that referenced this issue Dec 19, 2023
…ing types (GH-113236) (GH-113283)

gh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236)
(cherry picked from commit 76d757b)

Co-authored-by: ryan-duve <[email protected]>
encukou pushed a commit that referenced this issue Dec 19, 2023
…ing types (GH-113236) (GH-113284)

gh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236)
(cherry picked from commit 76d757b)

Co-authored-by: ryan-duve <[email protected]>
ryan-duve added a commit to ryan-duve/cpython that referenced this issue Dec 26, 2023
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants