liam-middlebrook / csh_ldap

Python 3 ORM for CSH LDAP
MIT License
2 stars 11 forks source link

Comparison fixes #23

Closed mxmeinhold closed 4 years ago

mxmeinhold commented 4 years ago

What?

Adds __hash__(), __eq__(), and __repr__() to CSHMember objects.

Why?

Without __eq__() things like list or set differencing don't work, and __hash__() goes along with __eq__().

Also adds __repr__() because I find dn to be more helpful than the memory address of a CSHMember instance, along the lines of #22.

Caveats

I'm running python 3.8

liam-middlebrook commented 4 years ago

Sorry for the slow review. The changes adding new functions here LGTM, but please take a look at my other comments about splitting up commits into granular related pieces.