~lifeless/storm/bug-620615

« back to all changes in this revision

Viewing changes to storm/expr.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:
35
35
# --------------------------------------------------------------------
36
36
# Basic compiler infrastructure
37
37
 
38
 
def _when(self, *types):
 
38
def _when(self, types):
39
39
    """Check Compile.when.  Defined here to ease the work of cextensions."""
40
40
    def decorator(method):
41
41
        for type in types:
84
84
            ...
85
85
            return "THE COMPILED SQL STATEMENT"
86
86
        """
87
 
        return _when(self, *types)
 
87
        return _when(self, types)
88
88
 
89
89
    def add_reserved_words(self, words):
90
90
        """Include words to be considered reserved and thus escaped.