Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python name of iterable that can be iterated many times

Tags:

python

I'm trying to improve my documentation. I want to say that this function accepts something that is a collections.Iterable, but the code will iterate over the iterable many times. A "list" is too specific, and an "iterable" doesn't work because some iterables can only be iterated once.

Is there a name for a thing? "Re-iterable"? Multiple-iterable?

like image 450
Neil G Avatar asked Dec 12 '11 13:12

Neil G


1 Answers

You probably want the term "sequence". A sequence in Python is something that has a length and supports item access by index.

like image 197
Sven Marnach Avatar answered Nov 04 '22 08:11

Sven Marnach