1. zjes
  2. rope_py3k

Source

rope_py3k / rope / base / builtins.py

Diff from to

File rope/base/builtins.py

  • Ignore whitespace
         result.update(self.initial)
         if self.pycore is not None:
             submodules = self.pycore._builtin_submodules(self.name)
-            for name, module in submodules.iteritems():
+            for name, module in submodules.items():
                 result[name] = rope.base.builtins.BuiltinName(module)
         return result
 
         # Getting methods
         collector('__getitem__', function=self._list_get)
         collector('pop', function=self._list_get)
-        collector('__getslice__', function=self._self_get)
 
         super(List, self).__init__(list, collector.attributes)
 
         collector = _AttributeCollector(str)
         collector('__iter__', get_iterator(self_object), check_existence=False)
 
-        self_methods = ['__getitem__', '__getslice__', 'capitalize', 'center',
-                        'decode', 'encode', 'expandtabs', 'join', 'ljust',
+        self_methods = ['__getitem__', 'capitalize', 'center',
+                        'encode', 'expandtabs', 'join', 'ljust',
                         'lower', 'lstrip', 'replace', 'rjust', 'rstrip', 'strip',
                         'swapcase', 'title', 'translate', 'upper', 'zfill']
         for method in self_methods:
         str_list = get_list(get_str())
         attributes = {}
         def add(name, returned=None, function=None):
-            builtin = getattr(file, name, None)
+            builtin = getattr(open, name, None)
             attributes[name] = BuiltinName(
                 BuiltinFunction(returned=returned, function=function,
                                 builtin=builtin))
         for method in ['close', 'flush', 'lineno', 'isatty', 'seek', 'tell',
                        'truncate', 'write', 'writelines']:
             add(method)
-        super(File, self).__init__(file, attributes)
+        super(File, self).__init__(open, attributes)
 
 
 get_file = _create_builtin_getter(File)
     'object': BuiltinName(BuiltinObject()),
     'type': BuiltinName(BuiltinType()),
     'iter': BuiltinName(BuiltinFunction(function=_iter_function, builtin=iter)),
-    'raw_input': BuiltinName(BuiltinFunction(function=_input_function, builtin=raw_input)),
+    'input': BuiltinName(BuiltinFunction(function=_input_function, builtin=input)),
     }
 
-builtins = BuiltinModule('__builtin__', initial=_initial_builtins)
+builtins = BuiltinModule('builtins', initial=_initial_builtins)