On this page
  1. typing.Deque
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

typing.Deque

Prev: typing.DefaultDict | Up: typing | Next: typing.Dict
Rel: typing.AbstractSet, typing.Annotated, typing.Any, typing.assert_never
Ref: docs.python.org — typing.Deque
Tags: #public #python3 #stdlib #typing


Import

import typing
from typing import Deque

Signature & Overview

typing.Deque(*args, **kwargs)

Deprecated alias to collections.deque.

Usage

from collections import deque
from typing import Deque

q: Deque[int] = deque([1, 2, 3])
assert q.popleft() == 1

Gotchas

REPL Inspect

from typing import Deque
help(Deque)

Linked from

Related notes