Skip to content

NamedStream

Base classes

Name Children Inherits
Protocol
typing
Base class for protocol classes.

⋔ Inheritance diagram

graph TD
  2516461715["typedefs.NamedStream"]
  1073422405["typing.Protocol"]
  3481597255["typing.Generic"]
  2751680898["builtins.object"]
  1073422405 --> 2516461715
  3481597255 --> 1073422405
  2751680898 --> 3481597255

🛈 DocStrings

Bases: Protocol

A stream that knows where it was opened from (e.g. a file object).

Source code in src/configz/typedefs.py
@runtime_checkable
class NamedStream(Protocol):
    """A stream that knows where it was opened from (e.g. a file object)."""

    name: object  # str or bytes path, or an int for file descriptors

:fa-brands-github: Show source on GitHub