Queue.get(...) takes optional float (#661)

This commit is contained in:
onnokort
2016-11-05 18:43:52 +01:00
committed by Guido van Rossum
parent 9881a2567e
commit cd1ef9149b

View File

@@ -1,6 +1,6 @@
# Stubs for Queue (Python 2)
from typing import Any, TypeVar, Generic
from typing import Any, TypeVar, Generic, Optional
_T = TypeVar('_T')
@@ -22,7 +22,7 @@ class Queue(Generic[_T]):
def full(self) -> bool: ...
def put(self, item: _T, block: bool = ..., timeout: float = ...) -> None: ...
def put_nowait(self, item: _T) -> None: ...
def get(self, block: bool = ..., timeout: float = ...) -> _T: ...
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
def get_nowait(self) -> _T: ...
class PriorityQueue(Queue): ...