Skip to content

prestontimmons/libtoml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libtoml

A Python toml parser. Mostly an experiment to learn the rply library.

Parses everything except arrays of tables. Instead, you can just do this:

products = [
    {"name": "Book", "price": "6.50", },
    {"name": "Bell", "price": "0.50"}, # trailing comma, no problem
]

Python dictionary syntax can be used for variables as well:

x = { 1: 2, 3.0: "0.50" }
y = { 
    "hello": "world",
}