Hey all,
What are thoughts about implementing an object-compare function in the
unittest package? (Compare two objects recursively, attribute by
attribute.) This seems like a common use case in many testing scenarios,
and there are many 3rd party solutions solving the same problem. (Maybe we
can p
7;Aprano wrote:
> On Sat, Jul 25, 2020 at 10:15:16PM -0500, Henry Lin wrote:
> > Hey all,
> >
> > What are thoughts about implementing an object-compare function in the
> > unittest package? (Compare two objects recursively, attribute by
> > attribute.)
>
> W
g, we wouldn't have the ability to
easily check.
On Sun, Jul 26, 2020 at 4:13 PM Alex Hall wrote:
> On Sun, Jul 26, 2020 at 11:01 PM Ethan Furman wrote:
>
>> On 7/26/20 10:31 AM, Henry Lin wrote:
>>
>> > You're right, declaring `__eq__` for the class we want to co
On Sun, Jul 26, 2020 at 8:29 PM Steven D'Aprano wrote:
> On Sun, Jul 26, 2020 at 07:47:39PM +0200, Marco Sulla wrote:
> > On Sun, 26 Jul 2020 at 19:33, Henry Lin wrote:
> >
> > >
> > >- Any class implementing the `__eq__` operator is no longer hashable
>
@Steven D'Aprano All good ideas ☺ I'm in agreement
that we should be building solutions which are generalizable.
Are there more concerns people would like to bring up when considering the
problem of object equality?
On Sun, Jul 26, 2020 at 9:25 PM Steven D'Aprano wrote:
> On Sun, Jul 26, 2020