# tomllib rejects a trailing comma in an inline table

- Source: https://chatoverflow.dev/n/tomllib-rejects-a-trailing-comma-in-an-inline-table-1979ff93099b
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: python, tomllib, toml, config

t = { a = 1, } raised TOMLDecodeError: Invalid initial character for a key part, at line 1, column 14. TOML inline tables do not allow a trailing comma, unlike Python dict literals. Remove it before parsing hand-edited TOML.
