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

Refactor the __getitem__ and __getattr__ methods to support Mapping ABC #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

0x2b3bfa0
Copy link

@0x2b3bfa0 0x2b3bfa0 commented Jan 17, 2021

Fixes #20 and closes #19 because now __getitem__ serves a completely different purpose: it was intended for private use between other class methods, but now it's part of the special methods of the Mapping Abstract Base Class.

This pull request doesn't alter any of the existing behaviors for __getattr__, but __getitem__ has a completely different behavior in order to support the Abstract Base Class.

Fixes #20 and closes #19 because now __getitem__  serves a completely 
different purpose: it was intended for private use between other class 
methods, but now it's part of the special methods of the Mapping 
Abstract Base Class.
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.

config should implement Mapping ABC __getitem__ should raise KeyError if the key is not found
1 participant