[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comparing hash table objects
From: |
Stefan Monnier |
Subject: |
Re: Comparing hash table objects |
Date: |
Mon, 13 Jun 2022 09:02:41 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Sam Steingold [2022-06-12 19:55:08] wrote:
> The way Python does it could be a good starting point:
> unless a class defines __eq__ method, the comparison is Lisp eq.
> So, if a class has structure, it should define the comparison method.
> See https://docs.python.org/3/reference/datamodel.html#object.__eq__
Seems like the exact same way ELisp works. The problem we have right
now (translated into Python) is that some people now want to add
a `__eq__` method to the class `hash-table` (they argue that the lack of
it was an oversight). It's easy to do what they ask for, but it breaks
backward compatibility.
Stefan
- Comparing hash table objects, Ihor Radchenko, 2022/06/08
- Re: Comparing hash table objects, Andreas Schwab, 2022/06/08
- Re: Comparing hash table objects, Ihor Radchenko, 2022/06/08
- Re: Comparing hash table objects, Richard Stallman, 2022/06/10
- Re: Comparing hash table objects, Ihor Radchenko, 2022/06/11
- Re: Comparing hash table objects, Stefan Monnier, 2022/06/11
- Re: Comparing hash table objects, Ihor Radchenko, 2022/06/12
- Re: Comparing hash table objects, Sam Steingold, 2022/06/12
- Re: Comparing hash table objects,
Stefan Monnier <=
- Re: Comparing hash table objects, Sam Steingold, 2022/06/13