On 2017-01-19 17:44, William Stein wrote:
On Thu, Jan 19, 2017 at 9:39 AM, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
On 2017-01-19 17:17, William Stein wrote:

... and presumably what we already decided is now completely
impossible to implement and banned from Python3?


I don't think we ever decided anything. For Parents, we use Robert
Bradshaw's implementation from 2008 but it's not documented what it does or
why it does things that way. For example, there is a doctest

sage: ZZ < QQ
True

but I doubt that this is the right thing to do.

Let me rewrite the above: ... and presumably what we already
**implemented** is now completely
impossible to implement and banned from Python3?

It's mostly possible. However, what's the point of trying to reverse engineer the current code when it probably doesn't do the right thing? Since we have to change comparison code anyway for Python 3, we should use this opportunity to properly define how comparison should work.

Secondly, Python 3 has different "best practices" for comparison compared to Python 2. Example:

Python 2.7.5:
>>> 1 < "x"
True

Python 3.4.1:
>>> 1 < "x"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: int() < str()

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to