(original) (raw)

In the light of Antoine's and Stephan's feedback I think this can be reconsidered -- while I want to take a cautious stance about resource consumption I don't want to stand in the way of progress.

On Thu, Dec 14, 2017 at 4:36 PM, Stephan Hoyer <shoyer@gmail.com> wrote:
On Thu, Dec 14, 2017 at 4:29 PM Yury Selivanov <yselivanov.ml@gmail.com> wrote:
On Thu, Dec 14, 2017 at 7:03 PM, Guido van Rossum <guido@python.org> wrote:
My motivation to add the slot wasn't the performance: it's just not
possible to have a class-level \_\_getitem\_\_ on types defined in C. The
only way is to define a base class in C and then extend it in
pure-Python. This isn't too hard usually, though.

This could potentially make it much more complicated to adding typing support to NumPy. numpy.ndarray is defined in C.




--
--Guido van Rossum (python.org/\~guido)