fix some TODOs (#1994)

- Made deque.maxlen read-only
- We don't support 3.2, so we don't care about signature changes in it
- There don't seem to be any missing set operations (I compared the dir() of this class to that of builtins.set)
This commit is contained in:
Jelle Zijlstra
2018-03-28 18:40:13 -07:00
committed by GitHub
parent a62c6be905
commit 103056eecf
3 changed files with 2 additions and 6 deletions

View File

@@ -187,7 +187,8 @@ class UserString(Sequence[str]):
# methods did not exist).
# But in practice it's not worth losing sleep over.
class deque(MutableSequence[_T], Generic[_T]):
maxlen = ... # type: Optional[int] # TODO readonly
@property
def maxlen(self) -> Optional[int]: ...
def __init__(self, iterable: Iterable[_T] = ...,
maxlen: int = ...) -> None: ...
def append(self, x: _T) -> None: ...