[Zope3-checkins] CVS: Zope3/src/zope/proxy - introspection.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
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/proxy
Modified Files:
Tag: NameGeddon-branch
introspection.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/introspection.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/proxy/introspection.py:1.1.2.1 Mon Dec 23 14:33:04 2002
+++ Zope3/src/zope/proxy/introspection.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.
-#
+#
##############################################################################
# XXX this module should bnecome unnecessary
@@ -47,12 +47,12 @@
from zope.proxy.context import wrapperTypes, getobject
for wrapper_type in wrapperTypes:
self._proxy_types[wrapper_type] = getobject
-
+
_clear = __init__
def defineProxyType(self, type_, remover):
"""Register a proxy type
-
+
A type and a function are provides. The function should take a
proxy and return the object proxied.
"""
@@ -68,14 +68,14 @@
Note that the object returned may still be a proxy, if there
are multiple layers of proxy.
-
+
"""
remover = self._proxy_types.get(type(obj))
if remover is None:
return obj
return remover(obj)
-
+
def removeAllProxies(self, obj):
"""Get the proxied oject with no proxies
@@ -91,7 +91,7 @@
remover = get(type(obj))
if remover is None:
return obj
-
+
obj = remover(obj)
i=i+1
@@ -101,7 +101,7 @@
"""Check whether the given object is a proxy
"""
return type(obj) in self._proxy_types
-
+
theProxyRegistry = ProxyRegistry()
isProxy = theProxyRegistry.isProxy