Monday, August 31

Geek

Encroaching Rust

It's been too long since I studied set theory.

I was wondering why my code was confused.  Either Python implemented certain set operators backwards, or I'd done something wrong.

Turns out to be the latter:
the relative complement of A in B [is] also known as the set-theoretic difference of B and A
Python implements an operator for set differences, rather than complements.  The results are identical, but the order of the operands is reversed.  Or if the order of the operands isn't reversed, the results are...  Let's just say, unexpected.

Posted by: Pixy Misa at 06:38 PM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 90 words, total size 1 kb.

Comments are disabled. Post is locked.
44kb generated in CPU 0.0496, elapsed 0.1398 seconds.
54 queries taking 0.1323 seconds, 338 records returned.
Powered by Minx 1.1.6c-pink.