Do union types actually exist in python?
Union typing is only needed when you have a statically typed language, as you need to declare that an object can return one of multiple types (in your case an int or str, or in the other example str or NoneType). Python deals in objects only, so there is never a need to even consider … Read more