[Python-checkins] r75553 - peps/trunk/pep-0391.txt

Jim Jewett jimjjewett at gmail.com
Thu Oct 22 00:48:49 CEST 2009


On Tue, Oct 20, 2009 at 4:12 AM, vinay.sajip <python-checkins at python.org> wrote:
> Author: vinay.sajip
> Date: Tue Oct 20 10:11:52 2009
> New Revision: 75553


> +The literal string ``'int://handlers.file'`` will be resolved in an
> +analogous way to the strings with the ``ext://`` prefix, but looking
> +in the configuration itself rather than the import namespace.

Is "int" too strongly identified with "integer" rather than "internal"?

Is there some concern about a possible URI scheme starting with int: or ext:?

> +``'int://handlers.email[subject]'``.  The latter form only needs to be
> +used if the key contains spaces or non-alphanumeric characters.  If an
> +index value consists only of decimal digits, access will be attempted
> +using the corresponding integer value, falling back to the string
> +value if needed.


Are you saying that the key can be

handlers.myspace.123

and that handlers.myspace[123] would first look for the 123rd entry in
myspace as a sequence, then would look in handlers myspace with 123 as
a key, then would look in handlers myspace with "123" as a key?

-------------------------

And as long as I looked at the PEP anyhow, I have a few other comments.

I would reorder the API list dictConfig first, and then explicitly
note that the other two are not needed to use the API; only to
customize it.

Also, does dictConfig return anything, or does it just store "the"
newly constructed DictConfigurator (or replacement) in an internal
location?

Is it specified whether calls to dictConfig (or even the default
class) will be additive, or must they re-send previous information?

This may be determined by the optional top-level key incremental, but
I'm not certain.  I'm also not certain how values like like "zap" and
"" (true and false in boolean context but not "is" True or False) are
handled.  I also wasn't sure I understood the part about ignoring
formatters, filters, and handlers.  Does this mean that the config
must be in a single dict when passed to the logger, so if there are
several sources of logging requirements (corporate, department,
toolX), then the app must combine them programmatically before calling
dictConfig?


More information about the Python-checkins mailing list