A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-October/049174.html below:

[Python-Dev] ConfigParser patches

[Python-Dev] ConfigParser patches [Python-Dev] ConfigParser patchesTim Peters tim.peters at gmail.com
Sat Oct 2 00:29:49 CEST 2004
[Guido]
...
> What I have come to like, both for dealing with XML and with .ini
> files, is something that lets you map the configuration values (or
> whatever it is that you're parsing, really) to Python attributes. This
> is really some kind of simplified DTD support, and there are different
> ways to go about it; but the net result is that you end up writing
> e.g. options.client.max_retries (which is an int with a default value)
> rather than options.getint("client", "max-retries").

LOL.  I wrote a Config wrapper for SpamBayes like that.  Then I
stopped paying attention, and next thing I knew all the
option-accessing code had been changed to look like SB's current

            prob = options["Classifier", "unknown_word_prob"]

instead.  But even that's better than options.getint("client",
"max-retries")!  Encoding the return type at every access point is
Plain Wrong.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4