On this page
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
- Deprecated alias in Python 3.9+: Use built-in
frozenset[str]directly.
REPL Inspect
from typing import FrozenSet
help(FrozenSet)
Linked from
Related notes
- tuts/python3/stdlib_module/typing/ForwardRef Linked here; links to this page; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/Generator Linked here; links to this page; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/typing/AbstractSet Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/Annotated Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/Any Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/assert_never Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/assert_type shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/AsyncContextManager shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/AsyncGenerator shared tags: #stdlib, #typing