Duck Typing Annotations in Python3
Duck Typing Annotations in Python3 Question: I am trying to add a type annotation to a function input argument that is a dataclass with attributes that overlap with another dataclass, which actually gets passed in as an input argument. Consider the following code: from dataclasses import dataclass from typing import TypeVar @dataclass class Foo: a: …