SVN: r20331 - trunk/quixote/doc
akuchlin-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected] Tue, 21 Jan 2003 15:33:33 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: akuchlin
Date: 2003-01-21 15:33:32 -0500 (Tue, 21 Jan 2003)
New Revision: 20331
Modified:
trunk/quixote/doc/programming.txt
Log:
Add Greg's suggestions; fix markup nits
Modified: trunk/quixote/doc/programming.txt
==============================================================================
--- trunk/quixote/doc/programming.txt (original)
+++ trunk/quixote/doc/programming.txt 2003-01-21 15:33:33.000000000 -0500
@@ -403,7 +403,7 @@
# ... generate prefs-editing page ...
``_q_resolve(name)``
--------------------
+--------------------
``_q_resolve()`` looks a bit like ``_q_getname()``, but is intended for
a different purpose. Quixote applications can be slow to start up
@@ -418,14 +418,14 @@
most common return type.)
``_q_resolve()`` is only ever called for names that are in
-``_q_exports`` and that don't already exist in the module or instance.
-It is not passed the request object, so its return value can't depend
-on the client in any way. Calls are also memoized; after being called
-the object returned will be added as an attribute of the containing
-module or instance, so ``_q_resolve()`` will be called at most once
-for a given name.
+``_q_exports`` and that don't already exist in the containing
+namespace. It is not passed the request object, so its return value
+can't depend on the client in any way. Calls are also memoized; after
+being called the object returned will be added to the containing
+namespace, so ``_q_resolve()`` will be called at most once for a given
+name.
-Most commonly, ``_q_resolve()`` will look something like this:
+Most commonly, ``_q_resolve()`` will look something like this::
_q_exports = [..., 'expensive', ...]
@@ -434,10 +434,10 @@
from otherpackage import expensive
return expensive
-Let's say this function is in app.ui. The first time /expensive is
-accessed, _q_resolve('expensive') is called, the
+Let's say this function is in ``app.ui``. The first time /expensive
+is accessed, ``_q_resolve('expensive')`` is called, the
otherpackage.expensive module is returned and traversal continues.
-app.ui.expensive is also set to the module objects, so future
+The imported module is also saved as ``app.ui.expensive``, so future
references to /expensive won't need to invoke the ``_q_resolve()``
hook.