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/049530.html below:

[Python-Dev] ConfigParser shootout, preliminary entry

[Python-Dev] ConfigParser shootout, preliminary entryGuido van Rossum gvanrossum at gmail.com
Wed Oct 20 17:25:34 CEST 2004
> The opt* property builders could be substituted by a single opt which
> took the default value as an argument:
> 
> opt(section_name, key_name, default_value)

What if I want the default to be None?  Sometimes absence of a value
is useful info. If you want a single factory function (not sure why)
then maybe the type should be passed in (perhaps optional, only if no
default is given).

> It works well as far as the option names are unique. In some cases,
> there are sections with a similar internal structure, and in this case
> the use of nested structures to represent sections is better.

"Better" is subjective. With my approach, you can give them different
prefixes in the Python API independent from their names as seen by the
user, and you only have to do this when there are actual conflicts
(which are rare except when certain styles are used).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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