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

Changeset 2167

Show
Ignore:
Timestamp:
03/30/09 11:20:31
Author:
fumanchu
Message:

Fixed some __builtin__ reference problems.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/python3/cherrypy/__init__.py

    r2165 r2167  
    9494            Help on class Thing in module pkg.mod: 
    9595             
    96             class Thing(__builtin__.object) 
     96            class Thing(object) 
    9797             |  A thing and its properties. 
    9898             |   
  • branches/python3/cherrypy/_cpchecker.py

    r2164 r2167  
    242242    def _populate_known_types(self): 
    243243        import builtins 
    244         builtins = [x for x in list(vars(__builtin__).values()) 
    245                     if type(x) is type(str)] 
     244        b = [x for x in list(vars(builtins).values()) 
     245             if type(x) is type(str)] 
    246246         
    247247        def traverse(obj, namespace): 
    248248            for name in dir(obj): 
    249249                vtype = type(getattr(obj, name, None)) 
    250                 if vtype in builtins
     250                if vtype in b
    251251                    self.known_config_types[namespace + "." + name] = vtype 
    252252         
  • branches/python3/cherrypy/lib/__init__.py

    r2156 r2167  
    9090            pass 
    9191         
    92         # See if the Name is in __builtin__
     92        # See if the Name is in builtins
    9393        try: 
    9494            import builtins 
    95             return getattr(__builtin__, o.name) 
     95            return getattr(builtins, o.name) 
    9696        except AttributeError: 
    9797            pass 

Hosted by WebFaction

Log in as guest/cpguest to create tickets