Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1513

Show
Ignore:
Timestamp:
12/11/06 00:30:49
Author:
fumanchu
Message:

2.x backport of [1045], [1312] (added CallFunc?, NoneType?, UnarySub?, UnaryAdd? to unrepr).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/cherrypy-2.x/cherrypy/lib/cptools.py

    r1497 r1513  
    367367        return m(o) 
    368368     
     369    def build_CallFunc(self, o): 
     370        callee, args, starargs, kwargs = map(self.build, o.getChildren()) 
     371        return callee(args, *(starargs or ()), **(kwargs or {})) 
     372     
    369373    def build_List(self, o): 
    370374        return map(self.build, o.getChildren()) 
     
    412416        parent = self.build(o.expr) 
    413417        return getattr(parent, o.attrname) 
     418     
     419    def build_NoneType(self, o): 
     420        return None 
     421     
     422    def build_UnarySub(self, o): 
     423        return -self.build_Const(o.getChildren()[0]) 
     424     
     425    def build_UnaryAdd(self, o): 
     426        return self.build_Const(o.getChildren()[0]) 
    414427 
    415428 

Hosted by WebFaction

Log in as guest/cpguest to create tickets