Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic

NMZivkovic/typeddict.py

Last active Oct 21, 2019
Embed
What would you like to do?
from typing import TypedDict
class Song(TypedDict):
artist: str
title: str
album: str
year: int
song: Song = {'artist': 'Nikola Nezit', 'title': 'Three Suns Halo', 'album': 'Triad', 'year': 2013}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment