This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ethan.furman, gvanrossum, josh.r, rhettinger, serhiy.storchaka, steven.daprano, terry.reedy, veky, xtreak
Date 2020-11-09.20:06:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I am sad that such code (as well as my former code in total_ordering) no longer works, but this is just a clever trick, and the code can be written in less clever but more explicit way.

On other hand, the warning helps to catch common mistakes like

   not self.__lt__(other)
   self.__lt__(other) or self.__eq__(other)
   super().__eq__(other) and self.x == other.x

Even non-beginners often make such kind of mistakes, and it is hard to catch them if you have not trained yourself specially. I suggest you to include lessons about writing complex comparison methods in your course for advanced users.
Date User Action Args
2020-11-09 20:06:15serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, rhettinger, terry.reedy, steven.daprano, ethan.furman, josh.r, veky, xtreak
2020-11-09 20:06:15serhiy.storchakasetmessageid: <>
2020-11-09 20:06:15serhiy.storchakalinkissue35712 messages
2020-11-09 20:06:15serhiy.storchakacreate