File: misc_py310.py

package info (click to toggle)
python-pdoc 16.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,080 kB
  • sloc: python: 5,260; javascript: 1,156; makefile: 18; sh: 3
file content (16 lines) | stat: -rw-r--r-- 267 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from typing import Dict


def new_union(a: int | dict[str, "Foo"]) -> bool | None:
    """Testing Python 3.10's new type union syntax."""


class Foo:
    pass


NewStyleDict = dict[str, str]
"""New-style dict."""

OldStyleDict = Dict[str, str]
"""Old-style dict."""