Campbell Barton wrote: > Hi, I have been writing a new C api that can build with both python 2.6 and 3.0 Questions about using current releases should be directed to the python-list (or comp.lang.python or gmane.comp.python.general), not python-dev, which is for development of future releases. > I found that when building with python 2.6, doing "a==b" between 2 > different pyrna_struct_Type's would run tp_compare > > But with python 3.0, "a==b" will always be false and tp_compare > function would not even run. > The only way to get it to run the tp_compare function was to do > "cmp(a, b)" however Id like to be able to use == still. In 3.0, the build-in cmp() should have been removed and will be for 3.0.1. Do not use it. I believe the tp_compare slot should not be used either. It will become reserved. It will not be removed only because that would change the binary layout. So use rich comparisons.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4