Changeset 178
- Timestamp:
- 09/25/07 01:30:29
- Files:
-
- trunk/geniusql/logic.py (modified) (1 diff)
- trunk/geniusql/test/test_logic.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/geniusql/logic.py
r177 r178 248 248 newindex = self.const_index(value) 249 249 self.newcode[-2:] = [newindex & 0xFF, newindex >> 8] 250 251 def visit_LOAD_DEREF(self, lo, hi): 252 src = self.instr_index[self.cursor] 253 if src and hasattr(src, '_func'): 254 # name = self.co_freevars[lo + (hi << 8)] 255 value = src._func.func_closure[lo + (hi << 8)] 256 value = codewalk.deref_cell(value) 257 newindex = self.const_index(value) 258 self.tail(3, 'LOAD_CONST', newindex & 0xFF, newindex >> 8) 250 259 251 260 trunk/geniusql/test/test_logic.py
r177 r178 101 101 'and ((x.DirectoryID == None) or (x.DirectoryID == 0))') 102 102 103 birth_month = 3 103 104 base_expr = logic.Expression(lambda x: x.BirthDate != None) 104 stnd_expr = logic.Expression(lambda x: month(x.BirthDate) == 3and105 stnd_expr = logic.Expression(lambda x: month(x.BirthDate) == birth_month and 105 106 day(x.BirthDate) == 12) 106 107 combo = base_expr + stnd_expr
