Type one of several classes
Type one of several classes Question: Let’s say I have the following two classes: class Literal: pass class Expr: pass class MyClass: def __init__(self, Type:OneOf(Literal, Expr)): pass How would I make the type one of the Expr or Literal class? The full example of what I’m trying to do is as follows: from enum import …