1. zjes
  2. rope_py3k

Source

rope_py3k / rope / base / builtins.py

Diff from to

File rope/base/builtins.py

  • Ignore whitespace
     def get_param_names(self, special_args=True):
         return self.argnames
 
+    @utils.saveit
+    def get_attributes(self):
+        result = _object_attributes(self.builtin.__class__, self)
+        return result
+
 
 class BuiltinUnknown(_BuiltinElement, pyobjects.PyObject):
 
         if inspect.isclass(child):
             pyobject = BuiltinClass(child, {}, parent=parent)
         elif inspect.isroutine(child):
-            pyobject = BuiltinFunction(builtin=child, parent=parent)
+            if inspect.ismethoddescriptor(child) and "__weakref__" in dir(obj):
+                try:
+                    bobj = child.__get__(obj.__weakref__.__objclass__())
+                except:
+                    bobj = child
+                pyobject = BuiltinFunction(builtin=bobj, parent=parent)
+            else:
+                pyobject = BuiltinFunction(builtin=child, parent=parent)
         else:
             pyobject = BuiltinUnknown(builtin=child)
         attributes[name] = BuiltinName(pyobject)