Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.3
Changeset: r75142:baf22eaf17ee
Date: 2014-12-21 10:33 +0100
http://bitbucket.org/pypy/pypy/changeset/baf22eaf17ee/
Log: Add Tcl_Obj.__eq__, fixes many tests
diff --git a/lib_pypy/_tkinter/tclobj.py b/lib_pypy/_tkinter/tclobj.py
--- a/lib_pypy/_tkinter/tclobj.py
+++ b/lib_pypy/_tkinter/tclobj.py
@@ -110,6 +110,11 @@
return self._string
return tkffi.string(tklib.Tcl_GetString(self._value)).decode('utf-8')
+ def __eq__(self, other):
+ if not isinstance(other, Tcl_Obj):
+ return NotImplemented
+ return self._value == other._value
+
@property
def string(self):
"the string representation of this object, either as str or bytes"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit