
Oct. 19, 2018
12:12 a.m.
On 18.10.18 18:49, Anders Hovmöller wrote:
If it's AND, shouldn't it be "hasinterfaces" (notice the s!)?
Yeah, could be. To be sure, we are on the same page here: "interface" refers to a set of attributes of the object in question, does it? E.g. like the __iter__ iterface. I usually don't care about the actual inheritance hierarchy but care about functionality.
One could also imagine that isinstance and issubclass taking a keyword argument for the logical operator. Maybe just something as simple as "isinstance(foo, (a, b), all=True)"
Does AND even make sense for isinstance/issubclass? Cheers, Sven