3 ms·
Sure, but if you want an immutable object with iter, reasonable equality operators baked in, and named access, you can either define iter, eq, neq, and le on a
by joshuamorton 9y ago
Sure, but if you want an immutable object with iter, reasonable equality operators baked in, and named access, you can either define iter, eq, neq, and le on a new style slotted object with a bunch of getter descriptors, or you can make a namedtuple.