[Python-Dev] Single- vs. Multi-pass iterability
Tim Peters
tim.one@comcast.net
Sun, 14 Jul 2002 00:44:16 -0400
[David Abrahams]
> Yep, I know about PySequence_Fast(), annd we're currently using that.
> However I have a bunch of numerics users who will undoubtedly be working
> with some kind of array from NumPy or something -- they'll be really
> unimpressed with me when PySequence_Fast() copies their huge multi-pass
> sequence without individual Python objects for the elements into a tuple
> with each double expressed as a separate Python float.
Now that you have a concrete use case (to the extent that "some kind of
NumPy array or something" can be called concrete <wink>), have you talked to
the NumPy people about it? They're very clever about making things run fast
(that's the reason for NumPy's existence), and they may want a different
approach entirely.
averse-to-generalizing-from-0-examples-ly y'rs - tim