Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created April 25, 2024 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mypy-play/3ad17a83f39c3a2c110abc28451d232b to your computer and use it in GitHub Desktop.
Save mypy-play/3ad17a83f39c3a2c110abc28451d232b to your computer and use it in GitHub Desktop.
Shared via mypy Playground
from typing import Final
# Sentinel to denote unset values
UNSET: Final[object] = object()
def foo(timezone: str | object | None = UNSET) -> None:
pass
if __name__ == "__main__":
foo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment