Alexander Belopolsky wrote:
We can start by reviewing the reasons for having separate PyNumber/PySequence/PyMappingMethods structures. I believe that one of the reasons is that many types need to allocate only one of the three.
That much is probably true.
Numpy arrays, IIRC, allocate all three. A dedicated PyArrayMethods struct can replace some if not all of these allocations.
I don't see how. NumPy arrays allocate all three because they override just about every method in existence. Adding another struct isn't going to eliminate the need for the existing ones. -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com