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

typing.ByteString

Prev: typing.BinaryIO | Up: typing | Next: typing.Callable
Rel: typing.AbstractSet, typing.Annotated, typing.Any, typing.assert_never
Ref: docs.python.org — typing.ByteString
Tags: #public #python3 #stdlib #typing


Import

import typing
from typing import ByteString

Signature & Overview

typing.ByteString(*args, **kwargs)

Deprecated alias to collections.abc.ByteString.

Usage

from typing import ByteString

# Deprecated alias for bytes | bytearray | memoryview (removed in Python 3.14)
assert ByteString is not None

Gotchas

REPL Inspect

from typing import ByteString
help(ByteString)

Linked from

Related notes