[Zope3-checkins] CVS: Zope3/src/zope/proxy/context - __init__.py:1.1.2.6 containmentiterator.py:1.1.2.2

Tim Peters tim.one@comcast.net
Tue, 24 Dec 2002 21:21:43 -0500


Update of /cvs-repository/Zope3/src/zope/proxy/context
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/proxy/context

Modified Files:
      Tag: NameGeddon-branch
	__init__.py containmentiterator.py 
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py.  The
files are fixed-points of that script now.  Fixed a few cases where
code relied on significant trailing whitespace (ouch).


=== Zope3/src/zope/proxy/context/__init__.py 1.1.2.5 => 1.1.2.6 ===
--- Zope3/src/zope/proxy/context/__init__.py:1.1.2.5	Tue Dec 24 11:07:46 2002
+++ Zope3/src/zope/proxy/context/__init__.py	Tue Dec 24 21:21:12 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """Wrapping/proxy coordination
 
@@ -39,7 +39,7 @@
     If the object is wrapped in a security proxy, then the context
     wrapper is inserted inside an equivalent security proxy.
     """
-    
+
     if type(_ob) in BasicTypes:
         # Don't wrap basic objects
         return _ob
@@ -50,7 +50,7 @@
         _ob = Proxy(wrapperCreator(_ob, _parent, **kw), checker)
     else:
         _ob = wrapperCreator(_ob, _parent, **kw)
-        
+
     return _ob
 
 def getWrapperObject(_ob):
@@ -59,7 +59,7 @@
     If the object is wrapped in a security proxy, then the object
     is inserted inside an equivalent security proxy.
     """
-    
+
     if type(_ob) in BasicTypes:
         # Don't wrap basic objects
         return _ob
@@ -70,7 +70,7 @@
         _ob = Proxy(getobject(_ob), checker)
     else:
         _ob = getobject(_ob)
-        
+
     return _ob
 
 def _contextWrapperChecker(ob):
@@ -95,11 +95,11 @@
     if type(_ob) is Proxy:
         _ob = getObject(_ob)
     return getcontext(_ob)
-    
+
 def isWrapper(_ob):
     if type(_ob) is Proxy:
         _ob = getObject(_ob)
-    return type(_ob) in wrapperTypes 
+    return type(_ob) in wrapperTypes
 
 class ContainmentIterator:
 
@@ -108,13 +108,13 @@
 
     def __iter__(self):
         return self
-    
+
     def next(self):
         _ob = self._ob
 
         if type(_ob) is Proxy:
             _ob = getObject(_ob)
-        
+
         if type(_ob) not in wrapperTypes:
             raise StopIteration
 
@@ -139,13 +139,13 @@
 
 
 ##############################################################################
-# 
+#
 # Approach
 #
 # The facilities here work by adding markers on methods or properties
 # that a custom wrapper class looks for.  We rely on the custom
 # wrapper class's __getattribute__ to rebind things on the way out.
-# 
+#
 # For further discission, see this wiki page (all on one line):
 # http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/...
 # zope.proxy.context.ContextMethod
@@ -181,7 +181,7 @@
     __Zope_ContextWrapper_contextful_set__ = True
 
 def wrapperCreator(object, context=None, **data):
-    has_call = (hasattr(object, '__call__') and 
+    has_call = (hasattr(object, '__call__') and
                 getattr(object.__call__,
                         '__Zope_ContextWrapper_contextful_get__', False))
     has_getitem = (hasattr(object, '__getitem__') and
@@ -211,7 +211,7 @@
             if getattr(class_value,
                        '__Zope_ContextWrapper_contextful_get__', False):
                 return class_value.__get__(self, class_)
-            
+
         return _Wrapper.__getattribute__(self, name)
 
     def __setattr__(self, name, value):


=== Zope3/src/zope/proxy/context/containmentiterator.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/proxy/context/containmentiterator.py:1.1.2.1	Mon Dec 23 14:33:05 2002
+++ Zope3/src/zope/proxy/context/containmentiterator.py	Tue Dec 24 21:21:12 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 
@@ -25,7 +25,7 @@
 
     def __iter__(self):
         return self
-    
+
     def next(self):
         ob = self._ob
         if type(ob) not in wrapperTypes:
@@ -34,4 +34,3 @@
         ob = getinnercontext(ob)
         self._ob = ob
         return ob
-