[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Traversing - __init__.py:1.1.2.5
Steve Alexander
steve@cat-box.net
Wed, 20 Mar 2002 17:32:00 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Traversing
In directory cvs.zope.org:/tmp/cvs-serv3161
Modified Files:
Tag: Zope-3x-branch
__init__.py
Log Message:
Added ZopeWrapper function to Traversing/__init__.py, which avoids
wrapping primitives.
Added test for this.
=== Zope3/lib/python/Zope/App/Traversing/__init__.py 1.1.2.4 => 1.1.2.5 ===
"""
+import Zope.ContextWrapper
+def ZopeWrapper(obj, context=None, **data):
+ if obj is None or isinstance(obj,
+ (int, long, float, complex, unicode, str)):
+ return obj
+ return Zope.ContextWrapper.Wrapper(obj, context, **data)
+
+