[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/copypastemove/
Update doc strings to ReST
Phil Ruggera
pruggera at san.rr.com
Fri Jul 23 16:58:55 EDT 2004
Log message for revision 26723:
Update doc strings to ReST
Changed:
U Zope3/trunk/src/zope/app/copypastemove/__init__.py
U Zope3/trunk/src/zope/app/copypastemove/interfaces.py
-=-
Modified: Zope3/trunk/src/zope/app/copypastemove/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/copypastemove/__init__.py 2004-07-23 20:50:50 UTC (rev 26722)
+++ Zope3/trunk/src/zope/app/copypastemove/__init__.py 2004-07-23 20:58:55 UTC (rev 26723)
@@ -15,6 +15,8 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+
from zope.interface import implements, Invalid
from zope.exceptions import NotFoundError, DuplicationError
from zope.proxy import removeAllProxies
@@ -32,9 +34,9 @@
class ObjectMover(object):
"""Adapter for moving objects between containers
- To use an object mover, pass a contained object to the class.
- The contained object should implement IContained. It should be
- contained in a container that has an adapter to INameChooser.
+ To use an object mover, pass a contained `object` to the class.
+ The contained `object` should implement `IContained`. It should be
+ contained in a container that has an adapter to `INameChooser`.
>>> from zope.app.container.contained import Contained
@@ -162,10 +164,10 @@
self.context = object
def moveTo(self, target, new_name=None):
- '''Move this object to the target given.
+ '''Move this object to the `target` given.
- Returns the new name within the target
- Typically, the target is adapted to IPasteTarget.'''
+ Returns the new name within the `target`
+ Typically, the `target` is adapted to `IPasteTarget`.'''
obj = self.context
container = obj.__parent__
@@ -190,14 +192,14 @@
del container[orig_name]
def moveable(self):
- '''Returns True if the object is moveable, otherwise False.'''
+ '''Returns ``True`` if the object is moveable, otherwise ``False``.'''
return True
def moveableTo(self, target, name=None):
'''Say whether the object can be moved to the given target.
- Returns True if it can be moved there. Otherwise, returns
- false.
+ Returns ``True`` if it can be moved there. Otherwise, returns
+ ``False``.
'''
if name is None:
name = self.context.__name__
@@ -210,9 +212,9 @@
class ObjectCopier(object):
"""Adapter for copying objects between containers
- To use an object copier, pass a contained object to the class.
- The contained object should implement IContained. It should be
- contained in a container that has an adapter to INameChooser.
+ To use an object copier, pass a contained `object` to the class.
+ The contained `object` should implement `IContained`. It should be
+ contained in a container that has an adapter to `INameChooser`.
>>> from zope.app.container.contained import Contained
>>> ob = Contained()
@@ -350,15 +352,15 @@
self.context = object
def copyTo(self, target, new_name=None):
- """Copy this object to the target given.
+ """Copy this object to the `target` given.
- Returns the new name within the target, or None
+ Returns the new name within the `target`, or ``None``
if the target doesn't do names.
- Typically, the target is adapted to IPasteTarget.
- After the copy is added to the target container, publish
- an IObjectCopied event in the context of the target container.
+ Typically, the `target` is adapted to `IPasteTarget`.
+ After the copy is added to the `target` container, publish
+ an `IObjectCopied` event in the context of the target container.
If a new object is created as part of the copying process, then
- an IObjectCreated event should be published.
+ an `IObjectCreated` event should be published.
"""
obj = self.context
container = obj.__parent__
@@ -380,11 +382,11 @@
target[new_name] = copy
def _configureCopy(self, copy, target, new_name):
- """Configures the copied object before it is added to target.
+ """Configures the copied object before it is added to `target`.
- target and new_name are provided as additional information.
+ `target` and `new_name` are provided as additional information.
- By default, copy.__parent__ and copy.__name__ are set to None.
+ By default, `copy.__parent__` and `copy.__name__` are set to ``None``.
Subclasses may override this method to perform additional
configuration of the copied object.
@@ -396,10 +398,10 @@
return True
def copyableTo(self, target, name=None):
- '''Say whether the object can be copied to the given target.
+ '''Say whether the object can be copied to the given `target`.
- Returns True if it can be copied there. Otherwise, returns
- False.
+ Returns ``True`` if it can be copied there. Otherwise, returns
+ ``False``.
'''
if name is None:
name = self.context.__name__
@@ -414,7 +416,7 @@
'''Principal clipboard
Clipboard information consists on tuples of
- {'action':action, 'target':target}.
+ ``{'action':action, 'target':target}``.
'''
def __init__(self, annotation):
Modified: Zope3/trunk/src/zope/app/copypastemove/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/copypastemove/interfaces.py 2004-07-23 20:50:50 UTC (rev 26722)
+++ Zope3/trunk/src/zope/app/copypastemove/interfaces.py 2004-07-23 20:58:55 UTC (rev 26723)
@@ -15,50 +15,51 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
from zope.interface import Interface
class IObjectMover(Interface):
- '''Use IObjectMover(obj) to move an object somewhere.'''
+ '''Use `IObjectMover(obj)` to move an object somewhere.'''
def moveTo(target, new_name=None):
'''Move this object to the target given.
Returns the new name within the target
- Typically, the target is adapted to IPasteTarget.'''
+ Typically, the target is adapted to `IPasteTarget`.'''
def moveable():
- '''Returns True if the object is moveable, otherwise False.'''
+ '''Returns ``True`` if the object is moveable, otherwise ``False``.'''
def moveableTo(target, name=None):
- '''Say whether the object can be moved to the given target.
+ '''Say whether the object can be moved to the given `target`.
- Returns True if it can be moved there. Otherwise, returns
- false.
+ Returns ``True`` if it can be moved there. Otherwise, returns
+ ``False``.
'''
class IObjectCopier(Interface):
def copyTo(target, new_name=None):
- """Copy this object to the target given.
+ """Copy this object to the `target` given.
- Returns the new name within the target, or None
+ Returns the new name within the `target`, or ``None``
if the target doesn't do names.
- Typically, the target is adapted to IPasteTarget.
+ Typically, the target is adapted to `IPasteTarget`.
After the copy is added to the target container, publish
- an IObjectCopied event in the context of the target container.
+ an `IObjectCopied` event in the context of the target container.
If a new object is created as part of the copying process, then
- an IObjectCreated event should be published.
+ an `IObjectCreated` event should be published.
"""
def copyable():
- '''Returns True if the object is copyable, otherwise False.'''
+ '''Returns ``True`` if the object is copyable, otherwise ``False``.'''
def copyableTo(target, name=None):
- '''Say whether the object can be copied to the given target.
+ '''Say whether the object can be copied to the given `target`.
- Returns True if it can be copied there. Otherwise, returns
- False.
+ Returns ``True`` if it can be copied there. Otherwise, returns
+ ``False``.
'''
class IPrincipalClipboard(Interface):
@@ -66,7 +67,7 @@
for a principal.
Clipboard information consists on tuples of
- {'action':action, 'target':target}.
+ ``{'action':action, 'target':target}``.
'''
def clearContents():
More information about the Zope3-Checkins
mailing list