[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/container - __init__.py:1.1.2.4 find.py:1.1.2.2
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:35 -0500
Update of /cvs-repository/Zope3/src/zope/app/interfaces/container
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/interfaces/container
Modified Files:
Tag: NameGeddon-branch
__init__.py find.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/app/interfaces/container/__init__.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/interfaces/container/__init__.py:1.1.2.3 Tue Dec 24 07:51:07 2002
+++ Zope3/src/zope/app/interfaces/container/__init__.py Tue Dec 24 21:20:34 2002
@@ -11,16 +11,16 @@
class ContainerError(Exception):
"""An error of a container with one of its components."""
-
+
class UnaddableError(ContainerError):
"""An object cannot be added to a container."""
-
+
def __init__(self, container, obj, message=""):
self.container = container
self.obj = obj
self.message = message and ": %s" % message
-
+
def __str__(self):
return ("%(obj)s cannot be added "
"to %(container)s%(message)s" % self.__dict__)
@@ -81,14 +81,14 @@
class IAdding(IView):
def add(content):
- """Add content object to container.
+ """Add content object to container.
- Add using the name in contentName. Returns the added object
- in the context of its container.
+ Add using the name in contentName. Returns the added object
+ in the context of its container.
- If contentName is already used in container, raises
- DuplicateIDError.
- """
+ If contentName is already used in container, raises
+ DuplicateIDError.
+ """
contentName = Attribute(
"""The content name, as usually set by the Adder traverser.
@@ -101,13 +101,13 @@
)
def nextURL():
- """Return the URL that the creation view should redirect to.
+ """Return the URL that the creation view should redirect to.
- This is called by the creation view after calling add.
+ This is called by the creation view after calling add.
- It is the adder's responsibility, not the creation view's to
- decide what page to display after content is added.
- """
+ It is the adder's responsibility, not the creation view's to
+ decide what page to display after content is added.
+ """
class IZopeItemContainer(IItemContainer):
@@ -195,12 +195,12 @@
class IAddNotifiable(Interface):
"""The Base interface for Managing Objects."""
-
+
def manage_afterAdd(object, container):
"""Hook method will call after an object is added to container."""
class IDeleteNotifiable(Interface):
"""The Base interface for Managing Objects."""
-
+
def manage_beforeDelete(object, container):
"""Hook method will call before object is removed from container."""
=== Zope3/src/zope/app/interfaces/container/find.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/interfaces/container/find.py:1.1.2.1 Mon Dec 23 14:31:48 2002
+++ Zope3/src/zope/app/interfaces/container/find.py Tue Dec 24 21:20:34 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.
-#
+#
##############################################################################
"""
@@ -22,7 +22,7 @@
"""
Find support for containers.
"""
-
+
def find(id_filters=None, object_filters=None):
"""Find object that matches all filters in all sub objects,
not including this container itself.
@@ -33,11 +33,9 @@
def matches(object):
"""Returns true if the object matches the filter criteria.
"""
-
+
class IIdFindFilter(Interface):
def matches(id):
"""Returns true if the id matches the filter criteria.
"""
-
-