refactoring so that multiple changes can be made with one variable?

Neil Cerutti horpner at yahoo.com
Wed Nov 15 09:20:35 EST 2006


On 2006-11-15, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On Wed, 15 Nov 2006 18:57:39 +1100, Steven D'Aprano
><steve at REMOVEME.cybersource.com.au> declaimed the following in
> comp.lang.python:
>> And last but most certainly not least, you can separate the
>> adjustment values into (say) an INI file, read them in at
>> run-time and pass those values to the factory function above.
>> Then write another function which walks through the INI file,
>> adjusting the values in place as needed. This is obviously
>> going to take the most work, so I strongly suggest you don't
>> go down this path unless you really have to.
>
> Nice to see I wasn't the only one to consider extending to an
> INI file for this <G>

Coincidentally, I'm just reading "The Pragmattic Programmer" for
the first time. One of guidelines is to pry the details ut of the
code if they might change. The above advice seems like a perfect
example.

-- 
Neil Cerutti
For those of you who have children and don't know it, we have a
nursery downstairs. --Church Bulletin Blooper



More information about the Python-list mailing list