diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-12-25 06:44:37 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-12-25 06:44:37 +0000 |
| commit | 0ac7b075f76b3989fe9eb763b73bab827c9deccd (patch) | |
| tree | 50c8d7d38837cb468af45ee90e34efec21bf3e73 /docs/designdefense.rst | |
| parent | a0169ff21b5cd7446bf0289bffdb52de8dc61290 (diff) | |
| download | pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.tar.gz pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.tar.bz2 pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.zip | |
Fix syntax errors found via manuel, and add manuel-style markers to prevent
untestable code blocks from being tested.
Diffstat (limited to 'docs/designdefense.rst')
| -rw-r--r-- | docs/designdefense.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/designdefense.rst b/docs/designdefense.rst index 9c6e2eb39..e4ce4f56d 100644 --- a/docs/designdefense.rst +++ b/docs/designdefense.rst @@ -30,9 +30,10 @@ registry" is not particularly pretty or intuitive, and sometimes it's just plain obtuse. Likewise, the conceptual load on a casual source code reader of code that uses the ZCA global API is somewhat high. Consider a ZCA neophyte reading the code that performs a typical -"unnamed utility" lookup using the ``zope.component.getUtility`` +"unnamed utility" lookup using the :func:`zope.component.getUtility` global API: +.. ignore-next-block .. code-block:: python :linenos: @@ -109,6 +110,7 @@ which returns the userid present in the current request or ``None`` if no userid is present in the current request. The application developer calls it like so: +.. ignore-next-block .. code-block:: python :linenos: @@ -695,9 +697,12 @@ associated "urlconf" such as ``r'^polls/(?P<poll_id>\d+)/$``: Zope, likewise allows you to add arbitrary keyword and positional arguments to any method of a model object found via traversal: +.. ignore-next-block .. code-block:: python :linenos: + from persistent import Persistent + class MyZopeObject(Persistent): def aview(self, a, b, c=None): return '%s %s %c' % (a, b, c) @@ -1093,6 +1098,7 @@ instance: Some folks understandably don't want to think about the submodule organization, and would rather be able to do: +.. ignore-next-block .. code-block:: python :linenos: |
