[Checkins] SVN: zope2docs/trunk/zdgbook/ComponentsAndInterfaces.rst Zope 2 now uses zope.interface

Baiju M baiju.m.mail at gmail.com
Wed Jun 15 07:35:18 EDT 2011


Log message for revision 121947:
  Zope 2 now uses zope.interface
  

Changed:
  U   zope2docs/trunk/zdgbook/ComponentsAndInterfaces.rst

-=-
Modified: zope2docs/trunk/zdgbook/ComponentsAndInterfaces.rst
===================================================================
--- zope2docs/trunk/zdgbook/ComponentsAndInterfaces.rst	2011-06-15 11:27:46 UTC (rev 121946)
+++ zope2docs/trunk/zdgbook/ComponentsAndInterfaces.rst	2011-06-15 11:35:17 UTC (rev 121947)
@@ -256,7 +256,7 @@
 describes.  From the Python interpreter, for example, you can walk
 right up to an interface and ask it for its *names*::
 
-  >>> User.names()
+  >>> IUser.names()
   ['getUserName', 'getFavoriteColor', 'getPassword']
 
 Interfaces can also give you more interesting information about their
@@ -266,10 +266,10 @@
 
 For example::
 
-  >>> User.namesAndDescriptions()
-  [('getUserName', <Interface.Method.Method object at 80f38f0>),
-  ('getFavoriteColor', <Interface.Method.Method object at 80b24f0>),
-  ('getPassword', <Interface.Method.Method object at 80fded8>)]
+  >>> IUser.namesAndDescriptions()
+  [('getUserName', <zope.interface.interface.Method.Method object at 80f38f0>),
+  ('getFavoriteColor', <zope.interface.interface.Method.Method object at 80b24f0>),
+  ('getPassword', <zope.interface.interface.Method.Method object at 80fded8>)]
 
 As you can see, the "description" of the Interface's three items in
 these cases are all `Method` objects.  Description objects can be
@@ -291,9 +291,9 @@
 
 For example::
 
-  >>> m = User.namesAndDescriptions()[0][1]
+  >>> m = IUser.namesAndDescriptions()[0][1]
   >>> m
-  <Interface.Method.Method object at 80f38f0>
+  <zope.interface.interface.Method.Method object at 80f38f0>
   >>> m.getSignatureString()
   '(fullName=1)'
   >>> m.getSignatureInfo()   



More information about the checkins mailing list