File: genericalias_demo.py

package info (click to toggle)
sphinx-toolbox 3.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,924 kB
  • sloc: python: 11,636; sh: 26; javascript: 25; makefile: 16
file content (13 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# stdlib
from typing import Callable, List, Tuple, Union

#: Some type alias
VarType = Union[List[str], Tuple[str, int, float], int, bytes, Callable[[str], int]]

#: Some variable
VARIABLE: VarType = ['a', 'b', 'c', 'd', 'e', 'f', 'g']

CONSTANT: int = 42
"""
Don't change this!"
"""