homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lukasz.langa
Recipients eric.araujo, fdrake, georg.brandl, lukasz.langa, rhettinger
Date 2010年11月22日.03:16:23
SpamBayes Score 5.5712107e-10
Marked as misclassified No
Message-id <1290395793.65.0.355106669717.issue10499@psf.upfronthosting.co.za>
In-reply-to
Content
SUMMARY
=======
This is a refactoring of configparser raised from discussions on #6517 and #9876. It solves both issues and makes the code quite elegant. Best part is, it's fully backwards compatible [1].
In the patch I basically did:
a) move the interpolation functionality out of the parsers
b) deprecate RCP and CP in favor of SCP
c) refactor the resulting code to get rid of duplicates
This means that actually despite the generalization and introduction of deprecation warnings, configparser lost 22 lines in the process. The implementation is complete and unit tested.
WHAT'S LEFT TO DO
=================
1. Obviously the new `interpolation` __init__ argument needs docs. This includes the docstrings on *Interpolation classes that describe how the algorithms work.
2. `ExtendedInterpolation` class implementing the buildout syntax, that would satisfy the request from #9876.
3. Once we have more interpolation implementations new test cases will be added to test_cfgparser.py.
Will do all three when I have any opinions on the current direction.
REVIEW HINTS
============
I need some thumbs up or advice on the design decisions made.
1. `interpolation` now takes a class, __init__ instantiates an object on its own. Do tell if taking an object upfront would be a better approach.
2. *Interpolation classes have methods which take the parser as an argument. Do tell if making it an object attribute would be a better approach.
All other points of interest during a review naturally apply here too.
[1] Assuming _names are private and can be moved around when needed.
History
Date User Action Args
2010年11月22日 03:16:33lukasz.langasetrecipients: + lukasz.langa, fdrake, georg.brandl, rhettinger, eric.araujo
2010年11月22日 03:16:33lukasz.langasetmessageid: <1290395793.65.0.355106669717.issue10499@psf.upfronthosting.co.za>
2010年11月22日 03:16:24lukasz.langalinkissue10499 messages
2010年11月22日 03:16:24lukasz.langacreate

AltStyle によって変換されたページ (->オリジナル) /