Nick Coghlan wrote:
> Terry Reedy wrote:
>> if not hasattr(factory, '__call__'): factory = __import__(factory)
>
> That won't quite work since the string generally isn't referring to a
> module, and due to the quirk of __import__ returning the top level
> module since that is what the interpreter
Terry Reedy wrote:
> if not hasattr(factory, '__call__'): factory = __import__(factory)
That won't quite work since the string generally isn't referring to a
module, and due to the quirk of __import__ returning the top level
module since that is what the interpreter needs to bind to a name as
part
Dj Gilcrease gmail.com> writes:
>
> I would recommend removing the class keyword and replacing it with the
> () as you have in the custom examples or replacing () with class so it
> is uniform across all config options
[snip]
>
> This just strikes me as odd to have to remember for built in hand
Terry Reedy udel.edu> writes:
>
[snip]
Terry,
Thanks for your helpful comments. I have checked in some changes to the PEP
(r76533) which take into account the comments you made.
Regards,
Vinay Sajip
___
Python-Dev mailing list
Python-Dev@python.or
Vinay Sajip wrote:
Full View
PEP 391 is, I believe, ready for review.
http://www.python.org/dev/peps/pep-0391/
This is my first reading of this. Comments:
nit: I believe "both of these serialization formats allow
deserialization of Python dictionaries." should be "... to Python
dictionaries
I would recommend removing the class keyword and replacing it with the
() as you have in the custom examples or replacing () with class so it
is uniform across all config options
handlers:
file:
class : logging.handlers.RotatingFileHandler
formatter: precise
filename: logconfig.log
ma
Full View
PEP 391 is, I believe, ready for review.
http://www.python.org/dev/peps/pep-0391/
I've
also worked up an implementation, though not yet checked it in: it's
available as a module "dictconfig.py" with accompanying unit tests in
"test_dictconfig.py", at:
http://bitbucket.org/vinay.sajip/d