Closed JonathanPlasse closed 3 months ago
Sort of a duplicate of https://github.com/python/typeshed/issues/7813, which we closed as "wontfix" (see detailed discussion in that issue for why :-)
Thank you, I need to improve my issue searching methodology.
Currently the
tuple
constructor only accepts iterables. https://github.com/python/typeshed/blob/97ccd8985a3b8fd7b888c0653e92f296db6fd56a/stdlib/builtins.pyi#L932-L933 But thetuple
constructor can also take in classes that only have the__getitem__
method and is not iterable.A
_GetItemIterable
could be added totuple.__new__
signature like foriter
. https://github.com/python/typeshed/blob/97ccd8985a3b8fd7b888c0653e92f296db6fd56a/stdlib/builtins.pyi#L1424-L1431I am open to make a PR to fix it.