Format: application/octet-stream
⬇ Download File (756 B)
   1  from _typeshed import SupportsLessThan
   2  from typing import Any, Callable, Iterable, List, Optional, Protocol, TypeVar
   3  
   4  _T = TypeVar("_T")
   5  
   6  def cmp_lt(x, y) -> bool: ...
   7  def heappush(heap: List[_T], item: _T) -> None: ...
   8  def heappop(heap: List[_T]) -> _T: ...
   9  def heappushpop(heap: List[_T], item: _T) -> _T: ...
  10  def heapify(x: List[_T]) -> None: ...
  11  def heapreplace(heap: List[_T], item: _T) -> _T: ...
  12  def merge(*iterables: Iterable[_T]) -> Iterable[_T]: ...
  13  def nlargest(n: int, iterable: Iterable[_T], key: Optional[Callable[[_T], SupportsLessThan]] = ...) -> List[_T]: ...
  14  def nsmallest(n: int, iterable: Iterable[_T], key: Optional[Callable[[_T], SupportsLessThan]] = ...) -> List[_T]: ...
  15  def _heapify_max(__x: List[_T]) -> None: ...  # undocumented
  16