[Zope3-checkins] CVS: Zope3/src/zope/interface - interfaces.py:1.26

Jim Fulton jim at zope.com
Mon Apr 5 15:44:03 EDT 2004


Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv13329/src/zope/interface

Modified Files:
	interfaces.py 
Log Message:
Removed lame getName, and getDoc. (Use __name__ and __doc__ instead.)

Removed lame getDescriptionFor. (Use __getitem__ instead.)

Removed lame queryDescriptionFor. (Use get instead.)

Fixed missformated docstring.


=== Zope3/src/zope/interface/interfaces.py 1.25 => 1.26 ===
--- Zope3/src/zope/interface/interfaces.py:1.25	Tue Mar 30 17:01:34 2004
+++ Zope3/src/zope/interface/interfaces.py	Mon Apr  5 15:44:01 2004
@@ -26,12 +26,6 @@
     __name__ = Attribute('__name__', 'The object name')
     __doc__  = Attribute('__doc__', 'The object doc string')
 
-    def getName():
-        """Returns the name of the object."""
-
-    def getDoc():
-        """Returns the documentation for the object."""
-
     def getTaggedValue(tag):
         """Returns the value associated with 'tag'.
 
@@ -232,23 +226,16 @@
         attributes defined by base classes will be included.
         """
 
-    def getDescriptionFor(name):
+    def __getitem__(name):
         """Get the description for a name
 
         If the named attribute is not defined, a KeyError is raised.
         """
-
-    __getitem__ = getDescriptionFor
-
-    def queryDescriptionFor(name, default=None):
-        """Look up the description for a name
-
-        If the named attribute is not defined, the default is
-        returned.
-        """
     
     def validateInvariants(obj, errors=None):
-        """validate object to defined invariants.  If errors is None,
+        """Validate invariants
+
+        Validate object to defined invariants.  If errors is None,
         raises first Invalid error; if errors is a list, appends all errors
         to list, then raises Invalid with the errors as the first element
         of the "args" tuple."""




More information about the Zope3-Checkins mailing list