Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

Changeset 216

Show
Ignore:
Timestamp:
06/05/06 21:39:01
Author:
fumanchu
Message:

New paragraph on Expression.kwtypes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/doc/managing.html

    r215 r216  
    3737always be bound to a Unit instance. In the example above, it's named 'x', 
    3838but 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 boolean 
     39can simply call <tt>e(unit)</tt>, and receive a boolean 
    4040value indicating whether our Unit "passes the test". Attribute lookups on 
    4141our 'x' object will apply to Unit Properties for that Unit object. 
     
    245245</pre> 
    246246 
     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, 
     249the function which we're going to wrap. But Expression objects may take 
     250a second argument, called "kwtypes". This argument must be a dictionary of 
     251{keyword: type} pairs. Dejavu doesn't do anything internally with this 
     252information; it's simply a standard place to keep it for use by your own 
     253applications. However, the kwtypes attribute will be persisted when 
     254pickling and unpickling Expression objects, a very common operation.</p> 
     255 
    247256<h4>Exporting the <tt>logic</tt> module</h4> 
    248257<p>The <tt>logic</tt> module (and <tt>codewalk</tt>, on which it is built)