[issue30140] Binary arithmetic does not always call subclasses first

2020-04-10 Thread Guido van Rossum
Guido van Rossum added the comment: Let's give up on this one. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30140] Binary arithmetic does not always call subclasses first

2019-07-15 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30140] Binary arithmetic does not always call subclasses first

2019-07-15 Thread Guido van Rossum
Guido van Rossum added the comment: Are there any core devs who care enough to make a decision here? -- ___ Python tracker ___ ___

[issue30140] Binary arithmetic does not always call subclasses first

2019-07-15 Thread Leonard Lausen
Change by Leonard Lausen : -- nosy: +leezu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30140] Binary arithmetic does not always call subclasses first

2018-09-20 Thread Nick Coghlan
Nick Coghlan added the comment: Note that we've left a similar operand precedence handling issue languishing for a long time over compatibility concerns: https://bugs.python.org/issue11477 In that case, NumPy is actually benefiting from the discrepancy with the documentation though, as the

[issue30140] Binary arithmetic does not always call subclasses first

2018-09-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30140] Binary arithmetic does not always call subclasses first

2018-09-17 Thread Guido van Rossum
Guido van Rossum added the comment: If anyone cares, here's what I recall of the history of this feature. Originally my design was just 1. try left arg's __op__ 2. if that returns NotImplemented, try right arg's __rop__ That's simple to explain and usually works. But when thinking through

[issue30140] Binary arithmetic does not always call subclasses first

2018-09-15 Thread Alexander Belopolsky
Change by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30140] Binary arithmetic does not always call subclasses first

2017-12-09 Thread Cheryl Sabella
Change by Cheryl Sabella : -- components: +Interpreter Core keywords: +needs review, patch stage: -> patch review versions: +Python 3.7 ___ Python tracker

[issue30140] Binary arithmetic does not always call subclasses first

2017-10-18 Thread Stephan Hoyer
Stephan Hoyer added the comment: Ping -- it would be great if someone could take a look at my PR. (I suspect it needs more documentation, tips on where to put that would be appreciated.) -- ___ Python tracker

[issue30140] Binary arithmetic does not always call subclasses first

2017-09-05 Thread Stephan Hoyer
Stephan Hoyer added the comment: Serhiy: thanks for the tip. I've updated my PR, which I think is now ready for review. -- ___ Python tracker ___

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: binary_op1() is wrong place for fixing this issue. You need to change SLOT1BINFULL in Objects/typeobject.c. -- nosy: +serhiy.storchaka ___ Python tracker

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-27 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1436 ___ Python tracker ___

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-25 Thread Stephan Hoyer
Stephan Hoyer added the comment: > The design pattern that has problems here is a bit unorthodox to start with. I agree. This was meant strictly as a simple example for illustrative purposes. Steven D'Aprano's example from python-ideas may be a better one:

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: I'd assume the preference for __rop__ only on subclass overload is because __rop__ method are usually fallback methods, and differ behaviorally from the __op__ methods in type strictness. In particular, the __rop__ fallbacks are often so non-strict that they

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: > could you point me to where this logic is implemented in CPython's source? Most of the relevant code is in Objects/abstract.c and Objects/typeobject.c. A BINARY_ADD opcode (for example) ends up calling PyNumber_Add:

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-23 Thread Stephan Hoyer
Stephan Hoyer added the comment: Posted to python-ideas: https://mail.python.org/pipermail/python-ideas/2017-April/045451.html Mark -- just out of curiosity, could you point me to where this logic is implemented in CPython's source? This feels like something that could once been called a bug

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-23 Thread Eric Wieser
Changes by Eric Wieser : -- nosy: +Eric.Wieser ___ Python tracker ___ ___

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-23 Thread Mark Dickinson
Mark Dickinson added the comment: This is probably worth bringing up on the python-dev or python-ideas mailing lists for greater visibility. I can't think of any plausible non-historical reason why it makes sense for comparisons to behave one way and arithmetic operators another. Altering

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-23 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-22 Thread Stephan Hoyer
New submission from Stephan Hoyer: We are writing a system for overloading NumPy operations (see PR [1] and design doc [2]) that is designed to copy and extend Python's system for overloading binary operators. The reference documentation on binary arithmetic [3] states: > Note: If the right