Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

PEP 518 lists some reasons not to use configparser and I agree with them wholeheartedly.[1] Personally I don't want to use ill-defined formats, even for simple projects.

[1] https://peps.python.org/pep-0518/#configparser



The only reason offered is that there are (or might be) differences between version of Python, mainly 2 and 3, as far as I can see.

Python 2 is EOL, so that's no longer a concern.

As for differences between Python 3 releases, isn't there a fairly large difference in TOML support as well, since in versions before 3.11 it doesn't work at all? Wouldn't specifying the behaviour of the INI parser as whatever 3.11 is doing (and raising an exception on earlier versions) amount to essentially the same thing?


Their reason was obsolete shortly after it was written, Python 2 was EOL years before TOML included.

Toml is ill-defined as well. ini files work fine for these trivial uses.

https://hitchdev.com/strictyaml/why-not/toml/

So now you have two flawed ways to do it, congrats.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: