[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-04-29 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset d27f95e3b52f by Eli Bendersky in branch '2.7': Issue #10912: add clarification for PyObject_RichCompareBool comparing identical objects http://hg.python.org/cpython/rev/d27f95e3b52f -- nosy: +python-dev

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-04-29 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10912 ___ ___ Python-bugs-list

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-04-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Reopening, as a 2.7 backport of this would be a nice thing to have. -- assignee: rhettinger - status: closed - open versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: I agree that the difference in behavior between the two functions is unfortunate, but that's unlikely to change now. The least we can do is make the documentation precise. I'm attaching a proposed patch to Doc/c-api/object.rst

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Sure. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10912 ___ ___

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Committed the fix to py3k in r88009 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10912 ___

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Backport to release31 branch in r88010 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10912 ___

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: For the record, the gory details as to *why* RichCompareBool makes more assumptions as to the meaning of equality than the basic RichCompare function can be found in issue 4296 (I just found that issue myself by looking at Mark's response to

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Nick, I read the protocol of issue 4296 and I understand the reasoning behind the code, but I still think the naming is mightily confusing. Two distinct changes went into a single function (A) Return -1/0/+1 instead of PyObject and (B) the

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Yeah, to prevent perfectly reasonable why questions, it is probably worth providing a little extra justification as an addendum to your new note (which is already an improvement on the complete silence on the topic that existed before). A

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +Devin Jeanpierre ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10912 ___ ___ Python-bugs-list

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10912 ___ ___

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: -1 on PyObject_RichCompareBoolEx() for 3.3 -- it is simply an invitation to shoot yourself (or others) in the foot. I've not seen real world code using bool(a==b) or its C equivalent, so it's hard to believe that there is a

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Indeed. I was actually wondering if it would be worth trying to write up a section for the language reference to describe the cases where a Python implementation is *expected* to assume reflexive equality. We (IMO) have a problem at the

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: If something needs to be written about NaNs or other invariant destroying objects, perhaps a FAQ entry would suffice (perhaps referencing http://bertrandmeyer.com/2010/02/06/reflexivity-and-other-pillars-of-civilization/ ).

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Raymond, I initially set easy on this issue because I considered it a documentation issue, not the place to resolve the harder debate of the semantics of these functions. Perhaps I was wrong? Also, I agree with Nick that the difference must

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-15 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Yes, it is a doc issue but sometimes those aren't easy to get right (in terms of being beneficial to the reader and in good alignment with the design intentions). Please attach the doc patch you want to go in and I'll

[issue10912] PyObject_RichCompare differs in behaviour from PyObject_RichCompareBool ; difference not noted in documentation

2011-01-14 Thread Devin Jeanpierre
New submission from Devin Jeanpierre jeanpierr...@gmail.com: PyObject_RichCoareBool is, according to the documentation in trunk (Doc\c-api\object.rst), exactly the same as PyObject_RichCompare, except it 1, 0, or -1 for error, false, and true respectively. However, it differs in behavior by