[Zope-Checkins] CVS: Zope3/lib/python/Zope/Exceptions - ExceptionFormatter.py:1.1.2.8

Jim Fulton jim@zope.com
Mon, 10 Jun 2002 15:34:55 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Exceptions
In directory cvs.zope.org:/tmp/cvs-serv5490/lib/python/Zope/Exceptions

Modified Files:
      Tag: Zope-3x-branch
	ExceptionFormatter.py 
Log Message:
Implemented 

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/IContainerPythonification

Along the way:

- Converted most uses of has_key to use in.

- Fixed a bug in Interface names and namesAndDescriptions methods 
  that caused base class attributes to be missed.



=== Zope3/lib/python/Zope/Exceptions/ExceptionFormatter.py 1.1.2.7 => 1.1.2.8 ===
 
         # Output a traceback supplement, if any.
-        if locals.has_key('__traceback_supplement__'):
+        if '__traceback_supplement__' in locals:
             # Use the supplement defined in the function.
             tbs = locals['__traceback_supplement__']
-        elif globals.has_key('__traceback_supplement__'):
+        elif '__traceback_supplement__' in globals:
             # Use the supplement defined in the module.
             # This is used by Scripts (Python).
             tbs = globals['__traceback_supplement__']