On Monday 10 December 2001 13:42, Geoffrey Talvola wrote:
> Why not just put the "magic" part into a separate source file?  I
> don't see how putting this kind of stuff directly into the config
> file gains any real power.

The end result would be the same either way, but I prefer doing it 
directly rather than implying that it should be done.

> In your own example above, importing the config file actually
> _creates_ two instance of application classes.  This could have
> side effects that you don't expect to get just by loading a config
> file.  It might cause lines to be written to logfiles.  It might
> raise exceptions, preventing you from reading the rest of the
> config file.

I see your point there, but if there's something wrong the exceptions 
will be raised anyway.  If a user puts invalid syntax into file you 
won't be able to load it.  If they put buggy code that raises 
exceptions then the effect is the same. Python will give them a good 
traceback and they can proceed from there.

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to