Changeset 216
- Timestamp:
- 06/05/06 21:39:01
- Files:
-
- trunk/doc/managing.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc/managing.html
r215 r216 37 37 always be bound to a Unit instance. In the example above, it's named 'x', 38 38 but you can use any name you like. Using lambdas as a base means that we 39 can simply call <tt> Expression(unit)</tt>, and receive a boolean39 can simply call <tt>e(unit)</tt>, and receive a boolean 40 40 value indicating whether our Unit "passes the test". Attribute lookups on 41 41 our 'x' object will apply to Unit Properties for that Unit object. … … 245 245 </pre> 246 246 247 <h4><a name='kwtypes'>Specifying types for Expression kwargs</a></h4> 248 <p>Up to now, we've constructed Expression objects with a single argument, 249 the function which we're going to wrap. But Expression objects may take 250 a second argument, called "kwtypes". This argument must be a dictionary of 251 {keyword: type} pairs. Dejavu doesn't do anything internally with this 252 information; it's simply a standard place to keep it for use by your own 253 applications. However, the kwtypes attribute will be persisted when 254 pickling and unpickling Expression objects, a very common operation.</p> 255 247 256 <h4>Exporting the <tt>logic</tt> module</h4> 248 257 <p>The <tt>logic</tt> module (and <tt>codewalk</tt>, on which it is built)
