|
From: Michael F. <fuz...@vo...> - 2006-07-17 09:58:01
|
Robin Munn wrote:
> On 7/17/06, Jack Kuan <jac...@wu...> wrote:
>
>> Hi all,
>>
>> I'm using ConfigObj 4.3.2 with its interpolation feature but the order
>> in which it does the
>> lookup is first in a child default section, and then in parent default
>> section , and then in the
>> global default section. What's preventing it from looking up in its own
>> section first? This
>> would be very convenient for me as I don't need to create an extra
>> default section just so that
>> things can be found by the lookup. Am I missing something?
>>
>> Thanks,
>> Jack
>>
>
> What you describe is how I thought it should work, too. So when I
> submitted a patch to add PEP 292-style interpolation ("$variable"
> instead of "%(variable)s"), I also included a patch to change the
> interpolation behavior to look up interpolated variables in the
> variable's own section, then its default, then its parent and its
> parent's default, and so on up to the top section. Kind of like how
> scoping works for nested functions. Michael Foord has said that the
> patch should go in the next version of ConfigObj (which will probably
> be 4.4.0) once he gets back to working on it.
>
> So it should behave the way you describe pretty soon.
>
>
You got there before me. :-)
I will hopefully announce the first alpha release of Movable Python 2
tonight, so I should get back to ConfigObj 'real soon now'.
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
|