[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/uniqueid/ Cosmetic
touches.
Gintautas Miliauskas
gintas at pov.lt
Wed Aug 4 15:41:06 EDT 2004
Log message for revision 26907:
Cosmetic touches.
Changed:
U Zope3/trunk/src/zope/app/uniqueid/__init__.py
U Zope3/trunk/src/zope/app/uniqueid/interfaces.py
-=-
Modified: Zope3/trunk/src/zope/app/uniqueid/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/uniqueid/__init__.py 2004-08-04 19:16:55 UTC (rev 26906)
+++ Zope3/trunk/src/zope/app/uniqueid/__init__.py 2004-08-04 19:41:05 UTC (rev 26907)
@@ -31,6 +31,7 @@
from zope.security.proxy import trustedRemoveSecurityProxy
from zope.event import notify
+
class UniqueIdUtility(object):
"""This utility provides a two way mapping between objects and
integer ids.
Modified: Zope3/trunk/src/zope/app/uniqueid/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/uniqueid/interfaces.py 2004-08-04 19:16:55 UTC (rev 26906)
+++ Zope3/trunk/src/zope/app/uniqueid/interfaces.py 2004-08-04 19:41:05 UTC (rev 26907)
@@ -33,7 +33,7 @@
class IUniqueIdUtilitySet(Interface):
def register(ob):
- """Registers an object and returns a unique id generated for it.
+ """Register an object and returns a unique id generated for it.
If the object is already registered, its id is returned anyway.
"""
@@ -45,35 +45,38 @@
"""
class IUniqueIdUtilityManage(Interface):
- """Some methods used by the view"""
+ """Some methods used by the view."""
def __len__():
- """Returns the number of objects indexed"""
+ """Return the number of objects indexed."""
def items():
- """Returns a list of (id, object) pairs"""
+ """Return a list of (id, object) pairs."""
class IUniqueIdUtility(IUniqueIdUtilitySet, IUniqueIdUtilityQuery,
IUniqueIdUtilityManage):
- """A utility that assigns unique ids to the objects
+ """A utility that assigns unique ids to objects.
Allows to query object by id and id by object.
"""
-class IUniqueIdRemovedEvent(Interface):
- """The event which get published before the unique id is removed
- from the utility so that the catalogs can unindex the object.
+class IUniqueIdRemovedEvent(Interface):
+ """The event which is published before the unique id is removed
+ from the utility so that the catalogs can unindex the object.
"""
+
original_event = Attribute(
"""The IObjectRemoveEvent related to this event""")
class UniqueIdRemovedEvent(object):
- """The event which get published before the unique id is removed
- from the utility so that the catalogs can unindex the object.
+ """The event which is published before the unique id is removed
+ from the utility so that the catalogs can unindex the object.
"""
+
implements(IUniqueIdRemovedEvent)
+
def __init__(self, event):
self.original_event = event
More information about the Zope3-Checkins
mailing list