[Python-ideas] Adding "Typed" collections/iterators to Python

Nathan Rice nathan.alexander.rice at gmail.com
Mon Dec 19 03:02:38 CET 2011

>> I believe it would be a good idea in instances where it is known that a
>> collection of a single type is going to be returned, to return a subclass
>> with type information and type specific methods "mixed in".
> Are you familiar with numpy, which has typed multi-dimensional arrays and
> array operations? And the option to add user functions to work with such?

I am, and vectorized functions/typed arrays from numpy are a source of
inspiration for me in this proposal.  The problem with having typed
arrays/etc as an add-on is that you lose the benefits as soon as you
step into code that isn't meant to interact with with the specific
library.  This isn't such an issue with NumPy since it has a healthy
ecosystem, but there are lots of other instances where having type
aware collections would be nice.

More information about the Python-ideas mailing list