Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __nonzero__ method to ParsingDict #75

Merged
merged 1 commit into from
Feb 12, 2016
Merged

Add __nonzero__ method to ParsingDict #75

merged 1 commit into from
Feb 12, 2016

Conversation

chrisamin
Copy link
Contributor

See #73

@chrisamin chrisamin changed the title Do the bulk of the validity checking for ParsingDict.keys() at class … Add __nonzero__ method to ParsingDict Feb 12, 2016
@chrisamin
Copy link
Contributor Author

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().

astrikos added a commit that referenced this pull request Feb 12, 2016
Add __nonzero__ method to ParsingDict
@astrikos astrikos merged commit 893f7f5 into RIPE-NCC:master Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants