Missing special attributes of class instances inherited from object (#943)

* Missing special attributes of class instances inherited from object
* object.__reduce__ returns a tuple

It's up to its inheritors to return either a tuple or a string.
This commit is contained in:
Andrey Vlasovskikh
2017-02-20 22:50:14 +03:00
committed by Łukasz Langa
parent 8d42a2899a
commit 295788b672
2 changed files with 6 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ class object:
__doc__ = ... # type: Optional[str]
__class__ = ... # type: type
__slots__ = ... # type: Optional[Union[str, unicode, Iterable[Union[str, unicode]]]]
__module__ = ... # type: str
def __init__(self) -> None: ...
def __new__(cls) -> Any: ...
@@ -44,6 +45,8 @@ class object:
def __getattribute__(self, name: str) -> Any: ...
def __delattr__(self, name: str) -> None: ...
def __sizeof__(self) -> int: ...
def __reduce__(self) -> tuple: ...
def __reduce_ex__(self, protocol: int) -> tuple: ...
class type(object):
__bases__ = ... # type: Tuple[type, ...]

View File

@@ -34,6 +34,7 @@ class object:
__class__ = ... # type: type
__dict__ = ... # type: Dict[str, Any]
__slots__ = ... # type: Optional[Union[str, Iterable[str]]]
__module__ = ... # type: str
def __init__(self) -> None: ...
def __new__(cls) -> Any: ...
@@ -47,6 +48,8 @@ class object:
def __getattribute__(self, name: str) -> Any: ...
def __delattr__(self, name: str) -> None: ...
def __sizeof__(self) -> int: ...
def __reduce__(self) -> tuple: ...
def __reduce_ex__(self, protocol: int) -> tuple: ...
if sys.version_info >= (3, 6):
def __init_subclass__(cls) -> None: ...