mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
add object.__dir__ in Python 3 (#1532)
In Python 3 (but not Python 2), `object().__dir__()` works and returns a list of strings. This is relevant when implementing a custom `__dir__` that invokes `super().__dir__()`.
This commit is contained in:
committed by
Guido van Rossum
parent
19275ea38a
commit
d60f26c448
@@ -50,6 +50,7 @@ class object:
|
||||
def __sizeof__(self) -> int: ...
|
||||
def __reduce__(self) -> tuple: ...
|
||||
def __reduce_ex__(self, protocol: int) -> tuple: ...
|
||||
def __dir__(self) -> List[str]: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init_subclass__(cls) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user