-
-
Couldn't load subscription status.
- Fork 229
Open
Description
About def alive_it(it: Collection[T], ...
| def alive_it(it: Collection[T], total: Optional[int] = None, *, |
Do we need
Collection[T] here? According to docs, Collection requires __contains__, __iter__, and __len__, thus it doesn't work on enumerate:
for x in alive_it([1,2,3]):
print("x", x) # x is `int`
for x in alive_it(enumerate([1,2,3])):
print("x", x) # x is `Unknown`Can we use Iterable[T] instead of Collection[T]?
Metadata
Metadata
Assignees
Labels
No labels