Categories
October Surprise 2024

How to specify different return types in python docstring

As you can see, it fetches the original item and either returns an instance of class AlphaRelease, BetaRelease or VRelease depending on the content of the field name of the items. What is best practice to define a return value with various possible types in the docstring?