[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Traversing - __init__.py:1.1.2.3

Steve Alexander steve@cat-box.net
Wed, 20 Mar 2002 16:25:00 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Traversing
In directory cvs.zope.org:/tmp/cvs-serv17687

Modified Files:
      Tag: Zope-3x-branch
	__init__.py 
Log Message:
corrections to ZopeWrapper and the hacking of __builtins__.
Added testZopeWrapper.py



=== Zope3/lib/python/Zope/App/Traversing/__init__.py 1.1.2.2 => 1.1.2.3 ===
 
 from Zope.ContextWrapper import Wrapper
-def ZopeWrapper(obj, context):
+def ZopeWrapper(obj, context=None, **data):
     if obj is None or isinstance(obj,
         (int, long, float, complex, unicode, str)):
         return obj
-    return Wrapper(obj, context)
+    return Wrapper(obj, context, **data)
     
 del Wrapper
 
@@ -47,8 +47,11 @@
 
     return flatten(class_or_type_or_tuple)
     
-__builtins__.isinstance = isinstance
+import __main__ 
+__main__.__builtins__.isinstance = isinstance
+del __main__
 del isinstance
+
 
 # borrow the Python tests, and add some to test our new behaviour