[Checkins] SVN: zope.introspector/trunk/src/zope/introspector/code.txt Update tests.
Uli Fouquet
uli at gnufix.de
Mon Aug 11 12:46:15 EDT 2008
Log message for revision 89672:
Update tests.
Changed:
U zope.introspector/trunk/src/zope/introspector/code.txt
-=-
Modified: zope.introspector/trunk/src/zope/introspector/code.txt
===================================================================
--- zope.introspector/trunk/src/zope/introspector/code.txt 2008-08-11 16:45:56 UTC (rev 89671)
+++ zope.introspector/trunk/src/zope/introspector/code.txt 2008-08-11 16:46:14 UTC (rev 89672)
@@ -218,7 +218,27 @@
>>> mod['resolve']
<zope.introspector.code.Function object at 0x...>
+ModuleInfos
+-----------
+The ``Module`` class is merely a wrapper around real modules, while
+``ModuleInfo`` objects provide us with the interesting informations
+about a certain module.
+
+As in the whole module, XXXInfo classes are adapters, that adapt a
+certain code representation type to the ``IInfo`` interface.
+
+Thus, we create a ``ModuleInfo`` object normally, by asking the
+component architechture for an appropriate adapter to ``IInfo``.
+
+ >>> from zope import component
+ >>> from zope.introspector.interfaces import IInfo
+ >>> infos = list(component.getAdapters((mod,), IInfo))
+ >>> infos
+ [(u'module', <zope.introspector.code.ModuleInfo object at 0x...>)]
+
+
+
Files
=====
More information about the Checkins
mailing list