On 03Aug2023 10:14, dn wrote:
Can you please explain why a multi-part second-argument must be a
tuple and not any other form of collection-type?
The signature is: isinstance(object, classinfo)
leading to "classinfo" of:
1/ a single class/type, eg int
2/ a tuple of same, eg ( int, str, )
3/ a
Can you please explain why a multi-part second-argument must be a tuple
and not any other form of collection-type?
The signature is: isinstance(object, classinfo)
leading to "classinfo" of:
1/ a single class/type, eg int
2/ a tuple of same, eg ( int, str, )
3/ a union type, eg int | str (v3.10