[IPython-dev] Configuration system thoughts
Tue Jul 28 14:02:55 CDT 2009
On Tue, Jul 28, 2009 at 2:15 AM, Ville M. Vainio<email@example.com> wrote:
> Many of these problems could be fixed by fixing stuff like prompts to
> actually look at the config variable every time. Since it needs some
> "computation" every time, you can remember the value of previous
> invocation and do the calculation only if it has changed.
Yes, that is indeed part of what needs to be done. In the current
code, I never gave much serious thought to these matters (I just wrote
it 'on the go'), but the problem is now much clearer. Basically we
need to be strict about:
- options/config objects that can be changed at runtime should always
be safe for modification. Basically if you can set a value, it's
because anything that depends on it will behave OK with the
- Any runtime changes that can't be done by modifying a simple config
variable, if really needed, will require a dedicated function to enact
the change, rather than trying to set a variable.
With this policy in place it would thus be safe, by definition, to
manipulate config objects at runtime.
More information about the IPython-dev