> Yes, I meant python 2.x
>

There are no zip objects in Python 2. You can easily get the exact same 
effect (pull the full result into memory at once, allow indexing, slicing, 
sorting in place, everything) in Julia. 
collect(zip(...))


But in Julia, unlike Python, you should be able to implement getindex for 
zip objects yourself, at least if you are happy to allocate a new tuple at 
every call. They seem to have types Base.Zip (with fields a, z containing 
the data) and Base.Zip2 (with fields a, b containing the data). 
dump(zip("foo", "bar", "whatever"))

That should actually be a nice exercise. I suppose indexing would just fail 
when the underlying data is not indexable.

Reply via email to