Douglas Alan wrote: > Lenard Lindstrom <[EMAIL PROTECTED]> writes: >
>>> Or are you suggesting that early in __main__.main(), when I wish to >>> debug something, I do something like: >>> __builtins__.open = __builtins__.file = MyFile >>> ? >>> I suppose that would work. > >> No, I would never suggest replacing a builtin like that. Even >> replacing a definite hook like __import__ is risky, should more than >> one package try and do it in a program. > > That misinterpretation of your idea would only be reasonable while > actually debugging, not for standard execution. Standard rules of > coding elegance don't apply while debugging, so I think the > misinterpretation might be a reasonable alternative. Still I think > I'd just prefer to stick to the status quo in this regard. > I totally missed the "when I wish to debug something". Skimming when I should be reading. --- Lenard Lindstrom <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list