platformsh / config-reader-python

Configuration reader library for Platform.sh hosting - Python version.
MIT License
7 stars 5 forks source link

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

Open 0x2b3bfa0 opened 3 years ago

0x2b3bfa0 commented 3 years ago

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.