Closed
Description
In the typing docs https://typing.readthedocs.io/en/latest/source/stubs.html#types it states:
"Avoid union return types, since they require isinstance() checks. Use Any or X | Any if necessary."
I really don't think this is a good advise. In cases like this I'm inclined to use overloads, handle each case separately or separate functionality into separate methods/functions. I'm interested as to whether or not you think this should be changed?