lib/pycall.rb in pycall-1.3.1 vs lib/pycall.rb in pycall-1.4.0
- old
+ new
@@ -56,9 +56,20 @@
def hasattr?(obj, name)
LibPython::Helpers.hasattr?(obj.__pyptr__, name)
end
+ def same?(left, right)
+ case left
+ when PyObjectWrapper
+ case right
+ when PyObjectWrapper
+ return left.__pyptr__ == right.__pyptr__
+ end
+ end
+ false
+ end
+
def import_module(name)
LibPython::Helpers.import_module(name)
end
def len(obj)