News for hackers. Stuff that matters.
Re:XML is better than YAML by CableNinja on Wednesday September 20, 2023 @11:58PM (#37593067)
I recently started a new project, and just outright didnt want to use yaml to do it. Sadly, im not everyone, and if i plan to release this project, i need to account for that. Whats a guy to do?

Ill tell ya hwhat... I made some simple functions; one to load any yaml/toml/json from file, by just looking at the extension (and providing an override for not normal file extensions). Another to output any data as yaml/toml/json.

I defaulted to using toml for my project, but have provided ways for everyone to be happy, with zero mucking around.

Aaaaaand for the not so subtle promotion, https://pypi.org/project/atckit

Located in the UtilFuncs class.

Re:XML is better than YAML by elzbardico on Thursday September 21, 2023 @06:12AM (#37595584)
What is the point of substituting yaml for something even worse?
Re:XML is better than YAML by CableNinja on Thursday September 21, 2023 @10:22AM (#37598061)
Worse is subjective.

In any case, the library i linked has the functionality to load any of the three configuration types, so while i prefer toml, if you grabbed my (under development) project, and hate toml, you can use yaml or json, if you wish.