Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-18 Thread Sven R. Kunze
On 12.10.18 01:30, Chris Barker via Python-ideas wrote: 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: hasinterface(an_object, (ABC1, ABC2, ABC3)) I actually like your idea and could imagine using "hasint

Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-18 Thread Anders Hovmöller
>> Even though, it would be the same as issubclass() (though I'd like an AND >> relationship with the tuple of ABCs..) > > When "hasinterface" ANDs the tuple, it's already different, isn't it? > If it's AND, shouldn't it be "hasinterfaces" (notice the s!)? One could also imagine that isinstan

Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-18 Thread Sven R. Kunze
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 c

Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-18 Thread Anders Hovmöller
> Does AND even make sense for isinstance/issubclass? Why wouldn't it? Python supports multiple inheritance. / Anders ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://

Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-18 Thread Chris Barker via Python-ideas
On Thu, Oct 18, 2018 at 10:12 AM, Sven R. Kunze wrote: > On 18.10.18 18:49, Anders Hovmöller wrote: > >> If it's AND, shouldn't it be "hasinterfaces" (notice the s!)? > > yeah, that would make sense. Is someone proposing something here? The point I was making, is in the case of ABCs: issubclass