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

Changeset 1045

Show
Ignore:
Timestamp:
04/19/06 13:31:43
Author:
fumanchu
Message:

Added CallFunc? and NoneType? to unrepr. This allows object instantiation in config files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/cptools.py

    r1008 r1045  
    270270        return m(o) 
    271271     
     272    def build_CallFunc(self, o): 
     273        callee, args, starargs, kwargs = map(self.build, o.getChildren()) 
     274        return callee(args, *(starargs or ()), **(kwargs or {})) 
     275     
    272276    def build_List(self, o): 
    273277        return map(self.build, o.getChildren()) 
     
    315319        parent = self.build(o.expr) 
    316320        return getattr(parent, o.attrname) 
     321     
     322    def build_NoneType(self, o): 
     323        return None 
    317324 
    318325 

Hosted by WebFaction

Log in as guest/cpguest to create tickets