> On 14 Jun 2019, at 11:31, Steven D'Aprano <st...@pearwood.info> wrote:
> 
>> On Fri, Jun 14, 2019 at 08:02:15AM -0000, eminbugrasaral--- via Python-ideas 
>> wrote:
>> class Base:
>>    pass
>> 
>> class A(Base):
>>    pass
> [...]
> 
>> While we can do `A == B`, or `B == C` or `B == B`, I would expect to 
>> be able to compare like this as well: `A >= B (if B is subclass or 
>> itself of A)`, or `B <= C (if B is a subclass or itself of C)`

I think this a bad idea. It's all down to statistics:
- how many times will this feature hide an error (you had classes but wanted 
instances)
- how often do you do this type of check

Anecdotally I pretty much never use issubclass. But I do sometimes miss parents 
so I get a class when I wanted an instance.

/ Anders 


(replying to the wrong mail because my mail client doesn't permit me to reply 
all to the correct one for some reason)
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/EYIOZPUSKURF7HLMFTVPX4OY4J2DWBPU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to