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

typing.FrozenSet

Prev: typing.ForwardRef | Up: typing | Next: typing.Generator
Rel: typing.AbstractSet, typing.Annotated, typing.Any, typing.assert_never
Ref: docs.python.org — typing.FrozenSet
Tags: #public #python3 #stdlib #typing


Import

import typing
from typing import FrozenSet

Signature & Overview

typing.FrozenSet(*args, **kwargs)

Deprecated alias to frozenset.

Usage

from typing import FrozenSet

allowed: FrozenSet[str] = frozenset({"read", "write"})
assert "read" in allowed

Gotchas

REPL Inspect

from typing import FrozenSet
help(FrozenSet)

Linked from

Related notes