Re: [Python-Dev] PEP 391 ready for review

2009-11-26 Thread Nick Coghlan
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

Re: [Python-Dev] PEP 391 ready for review

2009-11-26 Thread Nick Coghlan
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

Re: [Python-Dev] PEP 391 ready for review

2009-11-26 Thread Vinay Sajip
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

Re: [Python-Dev] PEP 391 ready for review

2009-11-26 Thread Vinay Sajip
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

Re: [Python-Dev] PEP 391 ready for review

2009-11-25 Thread Terry Reedy
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

Re: [Python-Dev] PEP 391 ready for review

2009-11-25 Thread Dj Gilcrease
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

[Python-Dev] PEP 391 ready for review

2009-11-25 Thread Vinay Sajip
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