3 ms·
> Note that it’s exactly the same in other major statically-typed languages like Java or C++ It's not just statically typed languages. Python also returns loa
by the_mitsuhiko 9y ago
> Note that it’s exactly the same in other major statically-typed languages like Java or C++
It's not just statically typed languages. Python also returns loads of special types from iterator functions, they are just usually not documented as being types:
>>> type(itertools.chain([1, 2], [3, 4]))
<class 'itertools.chain'>
- Sharlin 9y agoYes, I just meant that in a dynamically typed language you don’t have the problem of types leaking to signatures because there are no type annotations in the first place. And when there are, everything has indirection anyway.