[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/container/ Update
doc strings to ReST
Phil Ruggera
pruggera at san.rr.com
Mon Jul 19 00:19:07 EDT 2004
Log message for revision 26619:
Update doc strings to ReST
Changed:
U Zope3/trunk/src/zope/app/container/browser/adding.py
U Zope3/trunk/src/zope/app/container/browser/contents.py
U Zope3/trunk/src/zope/app/container/browser/find.py
U Zope3/trunk/src/zope/app/container/browser/metaconfigure.py
U Zope3/trunk/src/zope/app/container/btree.py
U Zope3/trunk/src/zope/app/container/constraints.py
U Zope3/trunk/src/zope/app/container/contained.py
U Zope3/trunk/src/zope/app/container/dependency.py
U Zope3/trunk/src/zope/app/container/directory.py
U Zope3/trunk/src/zope/app/container/find.py
U Zope3/trunk/src/zope/app/container/interfaces.py
U Zope3/trunk/src/zope/app/container/ordered.py
U Zope3/trunk/src/zope/app/container/sample.py
U Zope3/trunk/src/zope/app/container/size.py
U Zope3/trunk/src/zope/app/container/traversal.py
-=-
Modified: Zope3/trunk/src/zope/app/container/browser/adding.py
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/adding.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/browser/adding.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -18,6 +18,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from warnings import warn
import zope.security.checker
from zope.interface import implements
@@ -200,7 +202,7 @@
return len(self.addingInfo()) == 1
def hasCustomAddView(self):
- "This should be called only if there is singleMenuItem else return 0"
+ "This should be called only if there is `singleMenuItem` else return 0"
if self.isSingleMenuItem():
menu_item = self.addingInfo()[0]
if 'has_custom_add_view' in menu_item:
Modified: Zope3/trunk/src/zope/app/container/browser/contents.py
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/contents.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/browser/contents.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -15,6 +15,7 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
from zope.exceptions import NotFoundError
@@ -338,7 +339,7 @@
def hasClipboardContents(self):
- """ interogates the PrinicipalAnnotation to see if
+ """ interogates the `PrinicipalAnnotation` to see if
clipboard contents exist """
if not self.supportsPaste:
Modified: Zope3/trunk/src/zope/app/container/browser/find.py
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/find.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/browser/find.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -15,6 +15,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from zope.app.container.find import SimpleIdFindFilter
from zope.app.container.interfaces import IFind
from zope.app.traversing.api import getName
@@ -25,7 +27,7 @@
class Find(BrowserView):
def findByIds(self, ids):
- """Do a find for the ids listed in ids, which is a string."""
+ """Do a find for the `ids` listed in `ids`, which is a string."""
finder = IFind(self.context)
ids = ids.split()
# if we don't have any ids listed, don't search at all
Modified: Zope3/trunk/src/zope/app/container/browser/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/metaconfigure.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/browser/metaconfigure.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -11,11 +11,12 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Container-specific ``browser`` ZCML namespace directive handlers
+"""Container-specific browser ZCML namespace directive handlers
$Id$
"""
__docformat__ = 'restructuredtext'
+
from zope.interface import Interface
from zope.configuration.fields import GlobalObject
from zope.schema import Id
@@ -26,7 +27,7 @@
from zope.app.security.fields import Permission
class IContainerViews(Interface):
- """Define several container views for an ``IContainer`` implementation."""
+ """Define several container views for an `IContainer` implementation."""
for_ = GlobalObject(
title=u"The interface this containerViews are for.",
Modified: Zope3/trunk/src/zope/app/container/btree.py
===================================================================
--- Zope3/trunk/src/zope/app/container/btree.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/btree.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -20,6 +20,7 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
from persistent import Persistent
from BTrees.OOBTree import OOBTree
Modified: Zope3/trunk/src/zope/app/container/constraints.py
===================================================================
--- Zope3/trunk/src/zope/app/container/constraints.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/constraints.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -17,10 +17,10 @@
containment relationship.
A container expresses constraints through a precondition on it's
- __setitem__ method in it's interface.
+ `__setitem__` method in it's interface.
Preconditions can be simple callable objects, like functions. They
- should raise a zope.interface.Invalid exception to indicate that a
+ should raise a ``zope.interface.Invalid`` exception to indicate that a
constraint isn't satisfied:
>>> def preNoZ(container, name, ob):
@@ -51,7 +51,7 @@
We can also express constaints on the containers an object can be
added to. We do this by setting a field constraint on an object's
- __parent__ attribute:
+ `__parent__` attribute:
>>> import zope.schema
@@ -101,10 +101,10 @@
>>> c1.x = 1
>>> checkObject(c1, "bob", O())
- The checkObject function is handy when checking whether we can add an
+ The `checkObject` function is handy when checking whether we can add an
existing object to a container, but, sometimes, we want to check
whether an object produced by a factory can be added. To do this, we
- use checkFactory:
+ use `checkFactory`:
>>> class Factory(object):
... def __call__(self):
@@ -121,7 +121,7 @@
>>> checkFactory(c1, "bob", factory)
False
- Unlike checkObject, checkFactory:
+ Unlike `checkObject`, `checkFactory`:
- Returns a boolean value
@@ -134,7 +134,7 @@
>>> checkFactory(c1, "Zbob", factory)
True
- To work with checkFactory, a container precondition has to
+ To work with `checkFactory`, a container precondition has to
implement a factory method. This is because a factory, rather than
an object is passed. Ti illistrate this, we'll make preNoZ it's
own factory method:
@@ -149,6 +149,7 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
import zope.interface
from zope.interface import providedBy
@@ -231,7 +232,7 @@
"""
class ItemTypePrecondition(object):
- """Specify a __setitem__ precondition that restricts item types
+ """Specify a `__setitem__` precondition that restricts item types
Items must be one of the given types.
Modified: Zope3/trunk/src/zope/app/container/contained.py
===================================================================
--- Zope3/trunk/src/zope/app/container/contained.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/contained.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -11,10 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Classes to support implenting IContained
+"""Classes to support implenting `IContained`
$Id$
"""
+__docformat__ = 'restructuredtext'
from zope.proxy import getProxiedObject
from zope.exceptions import DuplicationError
@@ -41,7 +42,7 @@
from zope.app.container._zope_app_container_contained import getProxiedObject
class Contained(object):
- """Stupid mix-in that defines __parent__ and __name__ attributes
+ """Stupid mix-in that defines `__parent__` and `__name__` attributes
"""
zope.interface.implements(IContained)
@@ -212,11 +213,11 @@
"""Establish the containment of the object in the container
The object and necessary event are returned. The object may be a
- ContainedProxy around the original object. The event is an added
+ `ContainedProxy` around the original object. The event is an added
event, a moved event, or None.
- If the object implements IContained, simply set its __parent__
- and __name__ attributes:
+ If the object implements `IContained`, simply set its `__parent__`
+ and `__name__` attributes:
>>> container = {}
>>> item = Contained()
@@ -272,9 +273,9 @@
>>> event.oldName
u'foo'
- If the object implements ILocation, but not IContained, set it's
- __parent__ and __name__ attributes *and* declare that it
- implements IContained:
+ If the `object` implements `ILocation`, but not `IContained`, set it's
+ `__parent__` and `__name__` attributes *and* declare that it
+ implements `IContained`:
>>> from zope.app.location import Location
>>> item = Location()
@@ -291,8 +292,8 @@
True
- If the object doesn't even implement ILocation, put a
- ContainedProxy around it:
+ If the `object` doesn't even implement `ILocation`, put a
+ `ContainedProxy` around it:
>>> item = []
>>> x, event = containedEvent(item, container, 'foo')
@@ -333,7 +334,7 @@
Just return the contained object without an event. This is a convenience
"macro" for:
- containedEvent(object, container, name)[0]
+ ``containedEvent(object, container, name)[0]``
This function is only used for tests.
"""
@@ -343,10 +344,10 @@
"""Helper function to set an item and generate needed events
This helper is needed, in part, because the events need to get
- published after the object has been added to the container.
+ published after the `object` has been added to the `container`.
- If the item implements IContained, simply set it's __parent__
- and __name attributes:
+ If the item implements `IContained`, simply set it's `__parent__`
+ and `__name__` attributes:
>>> class IItem(zope.interface.Interface):
... pass
@@ -378,7 +379,7 @@
>>> item.__name__
u'c'
- If we run this using the testing framework, we'll use getEvents to
+ If we run this using the testing framework, we'll use `getEvents` to
track the events generated:
>>> from zope.app.event.tests.placelesssetup import getEvents
@@ -412,8 +413,8 @@
>>> item.moved is event
1
- We can suppress events and hooks by setting the __parent__ and
- __name__ first:
+ We can suppress events and hooks by setting the `__parent__` and
+ `__name__` first:
>>> item = Item()
>>> item.__parent__, item.__name__ = container, 'c2'
@@ -467,9 +468,9 @@
3
- If the object implements ILocation, but not IContained, set it's
- __parent__ and __name__ attributes *and* declare that it
- implements IContained:
+ If the object implements `ILocation`, but not `IContained`, set it's
+ `__parent__` and `__name__` attributes *and* declare that it
+ implements `IContained`:
>>> from zope.app.location import Location
>>> item = Location()
@@ -492,8 +493,8 @@
>>> len(getEvents(IObjectModifiedEvent))
4
- If the object doesn't even implement ILocation, put a
- ContainedProxy around it:
+ If the object doesn't even implement `ILocation`, put a
+ `ContainedProxy` around it:
>>> item = []
>>> setitem(container, container.__setitem__, u'i', item)
@@ -571,9 +572,10 @@
fixing_up = False
def uncontained(object, container, name=None):
- """Clear the containment relationship between the object amd the container
+ """Clear the containment relationship between the `object` and
+ the `container'
- If we run this using the testing framework, we'll use getEvents to
+ If we run this using the testing framework, we'll use `getEvents` to
track the events generated:
>>> from zope.app.event.tests.placelesssetup import getEvents
@@ -631,7 +633,7 @@
>>> len(getEvents(IObjectModifiedEvent))
1
- But, if either the name or parent are not None and they are not
+ But, if either the name or parent are not ``None`` and they are not
the container and the old name, we'll get a modified event but not
a removed event.
Modified: Zope3/trunk/src/zope/app/container/dependency.py
===================================================================
--- Zope3/trunk/src/zope/app/container/dependency.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/dependency.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -15,6 +15,7 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
from zope.app import zapi
from zope.app.dependable.interfaces import IDependable, DependencyError
Modified: Zope3/trunk/src/zope/app/container/directory.py
===================================================================
--- Zope3/trunk/src/zope/app/container/directory.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/directory.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -14,30 +14,32 @@
This module includes two adapters (adapter factories, really) for
providing a file-system representation for containers:
-noop
- Factory that "adapts" IContainer to IWriteDirectory.
+`noop`
+ Factory that "adapts" `IContainer` to `IWriteDirectory`.
This is a lie, since it just returns the original object.
-Cloner
- An IDirectoryFactory adapter that just clones the original object.
+`Cloner`
+ An `IDirectoryFactory` adapter that just clones the original object.
$Id$
"""
+__docformat__ = 'restructuredtext'
+
import zope.app.filerepresentation.interfaces
from zope.proxy import removeAllProxies
from zope.interface import implements
def noop(container):
- """Adapt an IContainer to an IWriteDirectory by just returning it
+ """Adapt an `IContainer` to an `IWriteDirectory` by just returning it
- This "works" because IContainer and IWriteDirectory have the same
- methods, however, the output doesn't actually implement IWriteDirectory.
+ This "works" because `IContainer` and `IWriteDirectory` have the same
+ methods, however, the output doesn't actually implement `IWriteDirectory`.
"""
return container
class Cloner(object):
- """IContainer to IDirectoryFactory adapter that clones
+ """`IContainer` to `IDirectoryFactory` adapter that clones
This adapter provides a factory that creates a new empty container
of the same class as it's context.
Modified: Zope3/trunk/src/zope/app/container/find.py
===================================================================
--- Zope3/trunk/src/zope/app/container/find.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/find.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -15,6 +15,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from zope.interface import implements
from interfaces import IFind, IIdFindFilter
from interfaces import IReadContainer
Modified: Zope3/trunk/src/zope/app/container/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/container/interfaces.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/interfaces.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -15,6 +15,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from zope.interface import Interface, Attribute, implements, Invalid
from zope.component.interfaces import IView
from zope.interface.common.mapping import IItemMapping
@@ -60,40 +62,40 @@
"""An interface for the write aspects of a container."""
def __setitem__(name, object):
- """Add the given object to the container under the given name.
+ """Add the given `object` to the container under the given name.
- Raises a TypeError if the key is not a unicode or ascii string.
- Raises a ValueError if key is empty.
+ Raises a ``TypeError`` if the key is not a unicode or ascii string.
+ Raises a ``ValueError`` if key is empty.
The container might choose to add a different object than the
one passed to this method.
- If the object doesn't implement IContained, then one of two
+ If the object doesn't implement `IContained`, then one of two
things must be done:
- 1. If the object implements ILocation, then the IContained
+ 1. If the object implements `ILocation`, then the `IContained`
interface must be declared for the object.
- 2. Otherwise, a ContainedProxy is created for the object and
+ 2. Otherwise, a `ContainedProxy` is created for the object and
stored.
- The object's __parent__ and __name__ attributes are set to the
+ The object's `__parent__` and `__name__` attributes are set to the
container and the given name.
- If the old parent was None, then an IObjectAddedEvent is
- generated, otherwise, and IObjectMovedEvent is generated. An
- IObjectModifiedEvent is generated for the container. If an
+ If the old parent was ``None``, then an `IObjectAddedEvent` is
+ generated, otherwise, and `IObjectMovedEvent` is generated. An
+ `IObjectModifiedEvent` is generated for the container. If an
add event is generated and the object can be adapted to
- IObjectAddedEvent, then the adapter's addNotify method is called
+ `IObjectAddedEvent`, then the adapter's `addNotify` method is called
with the event. If the object can be adapted to
- IObjectMovedEvent, then the adapter's moveNotify method is
+ `IObjectMovedEvent`, then the adapter's `moveNotify` method is
called with the event.
If the object replaces another object, then the old object is
deleted before the new object is added, unless the container
vetos the replacement by raising an exception.
- If the object's __parent__ and __name__ were already set to
+ If the object's `__parent__` and `__name__` were already set to
the container and the name, then no events are generated and
no hooks. This allows advanced clients to take over event
generation.
@@ -103,20 +105,20 @@
def __delitem__(name):
"""Delete the named object from the container.
- Raises a KeyError if the object is not found.
+ Raises a ``KeyError`` if the object is not found.
- If the deleted object's __parent__ and __name__ match the
- container and given name, then an IObjectRemovedEvent is
- generated and the attributes are set to None. If the object
- can be adapted to IObjectMovedEvent, then the adapter's
- moveNotify method is called with the event.
+ If the deleted object's `__parent__` and `__name__` match the
+ container and given name, then an `IObjectRemovedEvent` is
+ generated and the attributes are set to ``None``. If the object
+ can be adapted to `IObjectMovedEvent`, then the adapter's
+ `moveNotify` method is called with the event.
- Unless the object's __parent__ and __name__ attributes were
- initially None, generate an IObjectModifiedEvent for the
+ Unless the object's `__parent__` and `__name__` attributes were
+ initially ``None``, generate an `IObjectModifiedEvent` for the
container.
- If the object's __parent__ and __name__ were already set to
- None, then no events are generated. This allows advanced
+ If the object's `__parent__` and `__name__` were already set to
+ ``None``, then no events are generated. This allows advanced
clients to take over event generation.
"""
@@ -138,12 +140,12 @@
"""Revise the order of keys, replacing the current ordering.
order is a list or a tuple containing the set of existing keys in
- the new order. order must contain len(keys()) items and cannot
+ the new order. `order` must contain ``len(keys())`` items and cannot
contain duplicate keys.
- Raises TypeError if order is not a tuple or a list.
+ Raises ``TypeError`` if order is not a tuple or a list.
- Raises ValueError if order contains an invalid set of keys.
+ Raises ``ValueError`` if order contains an invalid set of keys.
"""
class IContainerNamesContainer(IContainer):
@@ -185,17 +187,17 @@
def add(content):
"""Add content object to container.
- Add using the name in contentName. Returns the added object
+ 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.
- If the content name hasn't been defined yet, returns None.
+ If the content name hasn't been defined yet, returns ``None``.
Some creation views might use this to optionally display the
name on forms.
Modified: Zope3/trunk/src/zope/app/container/ordered.py
===================================================================
--- Zope3/trunk/src/zope/app/container/ordered.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/ordered.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -15,6 +15,7 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
from zope.app.container.interfaces import IOrderedContainer
from zope.interface import implements
@@ -25,7 +26,7 @@
from zope.app.container.contained import Contained, setitem, uncontained
class OrderedContainer(Persistent, Contained):
- """ OrderedContainer maintains entries' order as added and moved.
+ """ `OrderedContainer` maintains entries' order as added and moved.
>>> oc = OrderedContainer()
>>> int(IOrderedContainer.providedBy(oc))
@@ -42,7 +43,7 @@
self._order = PersistentList()
def keys(self):
- """ See IOrderedContainer.
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc.keys()
@@ -60,7 +61,7 @@
return self._order[:]
def __iter__(self):
- """ See IOrderedContainer.
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc.keys()
@@ -76,7 +77,7 @@
return iter(self.keys())
def __getitem__(self, key):
- """ See IOrderedContainer
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc['foo'] = 'bar'
@@ -87,7 +88,7 @@
return self._data[key]
def get(self, key, default=None):
- """ See IOrderedContainer
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc['foo'] = 'bar'
@@ -100,7 +101,7 @@
return self._data.get(key, default)
def values(self):
- """ See IOrderedContainer.
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc.keys()
@@ -118,7 +119,7 @@
return [self._data[i] for i in self._order]
def __len__(self):
- """ See IOrderedContainer
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> int(len(oc) == 0)
@@ -131,7 +132,7 @@
return len(self._data)
def items(self):
- """ See IOrderedContainer.
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc.keys()
@@ -149,7 +150,7 @@
return [(i, self._data[i]) for i in self._order]
def __contains__(self, key):
- """ See IOrderedContainer.
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc['foo'] = 'bar'
@@ -164,7 +165,7 @@
has_key = __contains__
def __setitem__(self, key, object):
- """ See IOrderedContainer.
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc.keys()
@@ -203,7 +204,7 @@
return key
def __delitem__(self, key):
- """ See IOrderedContainer.
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc.keys()
@@ -227,7 +228,7 @@
self._order.remove(key)
def updateOrder(self, order):
- """ See IOrderedContainer
+ """ See `IOrderedContainer`.
>>> oc = OrderedContainer()
>>> oc['foo'] = 'bar'
Modified: Zope3/trunk/src/zope/app/container/sample.py
===================================================================
--- Zope3/trunk/src/zope/app/container/sample.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/sample.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -20,6 +20,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from zope.app.container.interfaces import IContainer
from zope.interface import implements
from zope.app.container.contained import Contained, setitem, uncontained
@@ -28,7 +30,7 @@
"""Sample container implementation suitable for testing.
It is not suitable, directly as a base class unless the subclass
- overrides _newContainerData to return a persistent mapping object.
+ overrides `_newContainerData` to return a persistent mapping object.
"""
implements(IContainer)
@@ -40,49 +42,49 @@
Subclasses should override this if they want different data.
- The value returned is a mapping object that also has get,
- has_key, keys, items, and values methods.
+ The value returned is a mapping object that also has `get`,
+ `has_key`, `keys`, `items`, and `values` methods.
"""
return {}
def keys(self):
- '''See interface IReadContainer'''
+ '''See interface `IReadContainer`'''
return self.__data.keys()
def __iter__(self):
return iter(self.__data)
def __getitem__(self, key):
- '''See interface IReadContainer'''
+ '''See interface `IReadContainer`'''
return self.__data[key]
def get(self, key, default=None):
- '''See interface IReadContainer'''
+ '''See interface `IReadContainer`'''
return self.__data.get(key, default)
def values(self):
- '''See interface IReadContainer'''
+ '''See interface `IReadContainer`'''
return self.__data.values()
def __len__(self):
- '''See interface IReadContainer'''
+ '''See interface `IReadContainer`'''
return len(self.__data)
def items(self):
- '''See interface IReadContainer'''
+ '''See interface `IReadContainer`'''
return self.__data.items()
def __contains__(self, key):
- '''See interface IReadContainer'''
+ '''See interface `IReadContainer`'''
return self.__data.has_key(key)
has_key = __contains__
def __setitem__(self, key, object):
- '''See interface IWriteContainer'''
+ '''See interface `IWriteContainer`'''
setitem(self, self.__data.__setitem__, key, object)
def __delitem__(self, key):
- '''See interface IWriteContainer'''
+ '''See interface `IWriteContainer`'''
uncontained(self.__data[key], self, key)
del self.__data[key]
Modified: Zope3/trunk/src/zope/app/container/size.py
===================================================================
--- Zope3/trunk/src/zope/app/container/size.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/size.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -16,6 +16,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from zope.app.i18n import ZopeMessageIDFactory as _
from zope.app.size.interfaces import ISized
from zope.interface import implements
@@ -28,11 +30,11 @@
self._container = container
def sizeForSorting(self):
- """See ISized"""
+ """See `ISized`"""
return ('item', len(self._container))
def sizeForDisplay(self):
- """See ISized"""
+ """See `ISized`"""
num_items = len(self._container)
if num_items == 1:
return _('1 item')
Modified: Zope3/trunk/src/zope/app/container/traversal.py
===================================================================
--- Zope3/trunk/src/zope/app/container/traversal.py 2004-07-19 03:35:43 UTC (rev 26618)
+++ Zope3/trunk/src/zope/app/container/traversal.py 2004-07-19 04:19:07 UTC (rev 26619)
@@ -15,6 +15,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from zope.interface import implements
from zope.exceptions import NotFoundError
from zope.publisher.interfaces.browser import IBrowserPublisher
@@ -80,7 +82,7 @@
_marker = object()
class ContainerTraversable(object):
- """Traverses containers via getattr and get."""
+ """Traverses containers via `getattr` and `get`."""
implements(ITraversable)
__used_for__ = IReadContainer
More information about the Zope3-Checkins
mailing list