<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 12.10.18 01:30, Chris Barker via
Python-ideas wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALGmxE+_L6Q-av8HtRRDLsagYhf9Ogwu38uajWnuLO2kminLZA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">If Python had a way to check ABCs
without issubclass, then I wouldn't care about subclasses at
all. I'd actually kind of like to have:
<div><br>
</div>
<div><font face="monospace, monospace">hasinterface(an_object,
(ABC1, ABC2, ABC3))</font></div>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>I actually like your idea and could imagine using "hasinterface"
as some asserts. Great idea. +1</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CALGmxE+_L6Q-av8HtRRDLsagYhf9Ogwu38uajWnuLO2kminLZA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>Even though, it would be the same as issubclass()
(though I'd like an AND relationship with the tuple of
ABCs..)</div>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>When "hasinterface" ANDs the tuple, it's already different, isn't
it?</p>
<p><br>
</p>
<p>Btw., issubclass would require a class, not an instance.
hasinterface, though, would work on all type of objects.</p>
<p><br>
</p>
<p>Best,<br>
Sven<br>
</p>
</body>
</html>