According to the documentation [`__dir__` must return a `Sequence`](https://docs.python.org/3/reference/datamodel.html#object.__dir__), but e.g. typeshed's annotations currently imply that any iterable will do: ```py class object: def __dir__(self) -> Iterable[str]: ... ``` https://github.com/python/typeshed/blob/26452a7c68c6ad512be00b553f7a03f869f64be9/stdlib/builtins.pyi#L125 <!-- gh-linked-prs --> ### Linked PRs * gh-114662 * gh-115234 * gh-115235 <!-- /gh-linked-prs -->
According to the documentation
__dir__must return aSequence, but e.g. typeshed's annotations currently imply that any iterable will do:https://github.com/python/typeshed/blob/26452a7c68c6ad512be00b553f7a03f869f64be9/stdlib/builtins.pyi#L125
Linked PRs
__dir__method docs: it allows returning an iterable #114662__dir__method docs: it allows returning an iterable (GH-114662) #115234__dir__method docs: it allows returning an iterable (GH-114662) #115235