How would I constrain a method to only return one of a set of specific values in python?
How would I constrain a method to only return one of a set of specific values in python? Question: Is there a pythonic way to constrain the output of a method so that it can only be one of a set? Sort of like typing but for specific values only. I hope you can see …