[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-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 ri

[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: https://mail.python.org/piperm

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30140] Binary arithmetic does not always call subclasses first

2017-10-18 Thread Stephan Hoyer
Stephan Hoyer <sho...@gmail.com> 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 tracke

[issue24379] Add operator.subscript as a convenience for creating slices

2018-07-19 Thread Stephan Hoyer
Stephan Hoyer added the comment: Raymond, Tal and Guido -- do any of you work routinely with multi-dimensional arrays? In my experience as someone who uses Python everyday for numerical computing (and has been doing so for many years), the need for an operator like this comes up with some