[Zope-dev] What's this weirdness? :-)

skip@mojam.com (Skip Montanaro) skip@mojam.com (Skip Montanaro)
Thu, 15 Apr 1999 16:58:47 -0400


This must be an Easter Egg someone left in Publish.py.  In
Publish.get_module_info I see

        # Reset response handling of tracebacks, if necessary:
        if debug_mode or not hide_tracebacks:
            def hack_response():
                import Response
                Response._tbopen  = '<PRE>'
                Response._tbclose = '</PRE>'

            hack_response()

Why go to the trouble of defining a function and calling it just to modify
Response._tbopen/_tbclose?  Can't they just be set directly?

Skip Montanaro	| Mojam: "Uniting the World of Music" http://www.mojam.com/
skip@mojam.com  | Musi-Cal: http://www.musi-cal.com/
518-372-5583