Changeset 214
- Timestamp:
- 11/05/07 14:35:46
- Files:
-
- trunk/geniusql/logic.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/geniusql/logic.py
r213 r214 368 368 """Return True if self.func == (lambda: value), False otherwise.""" 369 369 fc = self.func.func_code 370 return (fc.co_code == 'd\x01\x00S' and 370 if fc.co_code in ('d\x00\x00S', 'd\x01\x00S'): 371 # LOAD_CONST 0/1 0 RETURN_VALUE 372 if len(fc.co_consts) == 2 and fc.co_consts[1] == value: 371 373 # i.e., fc.co_consts == (docstring or None, value) 372 len(fc.co_consts) == 2 and fc.co_consts[1] == value) 374 return True 375 elif fc.co_code == 't\x00\x00S' and len(fc.co_consts) == 1: 376 # LOAD_CONST 0 0 RETURN_VALUE 377 return True 378 return False 373 379 374 380
