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.
--
Robin Munn
Rob...@gm...
GPG key 0xD6497014
|