Skip to content

Instantly share code, notes, and snippets.

@KotlinIsland
Created October 29, 2021 10:06
Show Gist options
  • Save KotlinIsland/7d5f73f90546d80fdcc12e01359339b6 to your computer and use it in GitHub Desktop.
Save KotlinIsland/7d5f73f90546d80fdcc12e01359339b6 to your computer and use it in GitHub Desktop.
python typing overview

typing

Machinery that creates type annotations and interacting with type annotations (Any / cast / get_args)

builtins

Stuff that gets injected into the global namespace(like None), also contains things that are not accessible(like NoneType)

Types

exposes some of the hidden things from builtins

collections.abc

Abstract base classes for the standard collections and functions (Sequence / Coroutine / Callable)

typeshed

type stubs for the stdlib and third party modules

_typeshed

a module that only exists at type time and contains some helper types and type stubs for things in builtins (like NoneType)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment