RIPE-NCC / ripe-atlas-sagan

A parsing library for RIPE Atlas measurement results
GNU General Public License v3.0
47 stars 25 forks source link

Add __nonzero__ method to ParsingDict #75

Closed chrisamin closed 8 years ago

chrisamin commented 8 years ago

See https://github.com/RIPE-NCC/ripe.atlas.sagan/pull/73

chrisamin commented 8 years ago

The class decorator doesn't help because that only works on ParsingDict methods/constants, not on the actual subclasses. That's the difference in this case with the metaclass solution.

I'm going to give up on that idea and just define a nonzero method so that it's harder to accidentally call keys().