On Mon, Dec 21, 2020 at 6:32 PM Chris Angelico <ros...@gmail.com> wrote:

> But the real question is: Why do points compare equal based on their
> locations, if you need them to be independently stored in a set?
> Logically, if they are equal, the set either contains that one thing
> or it doesn't.
>

This is a 3 minute example, not a fleshed out application design.  The
intuition I was going for was that various places might be located at e.g.
lat/lon coordinates. But some are in the same building, hence equal
address.  Using `==` as a way of comparing being in the same place could be
useful.  Yes, I can also think of other ways of designing this (e.g.
`p1.sameAddress(p2)`).  My goal here was showing plausibility, not
proposing a specific software design for a given need.


-- 
The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.
_______________________________________________
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/BP5F6RMRI2RY7WLF7JXZIDKN7PWM3U25/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to