~lifeless/storm/bug-620615

« back to all changes in this revision

Viewing changes to storm/psycer.py

  • Committer: Gustavo Niemeyer
  • Date: 2008-06-18 23:13:04 UTC
  • mto: (235.2.21 need-for-speed-revenge)
  • mto: This revision was merged to the branch mainline in revision 245.
  • Revision ID: gustavo@niemeyer.net-20080618231304-iww2kewacv2ux78v
Simplify the calling semantics of _when in the expr module, as
suggested by James.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
_bound = []
3
 
 
4
 
def bind(object, depth=None):
5
 
    _bound.append((object, depth))
6
 
 
7
 
def enable():
8
 
    import psyco
9
 
    for object, depth in _bound:
10
 
        if depth is not None:
11
 
            psyco.bind(object, depth)
12
 
        else:
13
 
            psyco.bind(object)