why use special config formats?

Steven D'Aprano steve at REMOVETHIScyber.com.au
Sat Mar 11 11:26:06 EST 2006


On Sat, 11 Mar 2006 05:49:38 -0800, gangesmaster wrote:

>>> Why is the first uglier than the second?
> YES THATS THE POINT. PYTHON CAN BE USED JUST LIKE A CONFIG FILE.
> 
> and if your users did
> timeout = "300"
> instead of
> timeout = 300
> 
> then either your config parser must be uber-smart and all-knowing, and
> check the types of key-value pairs, or your server would crash. either
> way is bad, and i prefer crash-on-use then
> know-everything-and-check-at-the-parser-level.

Well, I think this puts a new light on the argument from Tomer: he'd
prefer his server to crash than to spend some time validating his data.

Would you mind telling us what software you've been involved in writing,
so we know what software to avoid?


-- 
Steven.




More information about the Python-list mailing list