From 0ac7b075f76b3989fe9eb763b73bab827c9deccd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 25 Dec 2009 06:44:37 +0000 Subject: Fix syntax errors found via manuel, and add manuel-style markers to prevent untestable code blocks from being tested. --- docs/designdefense.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs/designdefense.rst') 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\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: -- cgit v1.2.3