automatic deep equality

30 views
Skip to first unread message

Alexander Tsepkov

unread,
Dec 7, 2015, 5:39:22 PM12/7/15
to RapydScript
RapydScript now supports proper deep equality like Python. To use it, include the following statement at the top of your file:

    from danger_zone import equality

Afterwards all == operators will compile to deep equality, while 'is' will compile to ===.

I've added it because I was able to push the overhead for using deep equality over === down to zero, hence it is safe to use this on primitives as well. For more information please see my blog post: http://blog.pyjeon.com/2015/12/07/equality-operator/

Alexander Tsepkov

unread,
Dec 23, 2015, 10:07:03 AM12/23/15
to RapydScript
Out of curiosity, has anyone in the community started using the new deep equality? Do you find it beneficial? Any limitations anyone noticed that you'd suggest I address before making the feature mainstream? Since it's opt-in rather than opt-out I'm guessing it doesn't have as many eyeballs on it.
Reply all
Reply to author
Forward
0 new messages