summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2020-04-03 06:11:02 -0500
committerJason Madden <jamadden@gmail.com>2020-04-06 09:14:45 -0500
commit1af83ef9f90aa7a558314892b72eec6d62263981 (patch)
tree51b90d4cee2a99c5725c26c76c7e8c292f466742 /docs
parent139bab56a722ac9f350c55f24e47b2decd1c2e1e (diff)
downloadzope-interface-1af83ef9f90aa7a558314892b72eec6d62263981.tar.gz
Add documentation for taggedValue and invariant.
Diffstat (limited to 'docs')
-rw-r--r--docs/README.rst5
-rw-r--r--docs/api/declarations.rst18
2 files changed, 23 insertions, 0 deletions
diff --git a/docs/README.rst b/docs/README.rst
index ff271a6..6fbd5f8 100644
--- a/docs/README.rst
+++ b/docs/README.rst
@@ -718,6 +718,8 @@ that lists the specification and all of it's ancestors:
Tagged Values
=============
+.. autofunction:: taggedValue
+
Interfaces and attribute descriptions support an extension mechanism,
borrowed from UML, called "tagged values" that lets us store extra
data:
@@ -780,9 +782,12 @@ versions of functions.
>>> IExtendsIWithTaggedValues.getDirectTaggedValue('squish')
'SQUASH'
+
Invariants
==========
+.. autofunction:: invariant
+
Interfaces can express conditions that must hold for objects that
provide them. These conditions are expressed using one or more
invariants. Invariants are callable objects that will be called with
diff --git a/docs/api/declarations.rst b/docs/api/declarations.rst
index 26847b0..955d246 100644
--- a/docs/api/declarations.rst
+++ b/docs/api/declarations.rst
@@ -18,6 +18,24 @@ carefully at each object it documents, including providing examples.
.. currentmodule:: zope.interface
+Declaring Interfaces
+====================
+
+To declare an interface itself, extend the ``Interface`` base class.
+
+.. autointerface:: Interface
+ :noindex:
+
+.. autofunction:: taggedValue
+ :noindex:
+
+ .. documented more thoroughly in README.rst
+
+.. autofunction:: invariant
+ :noindex:
+
+ .. documented in README.rst
+
Declaring The Interfaces of Objects
===================================