-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update options to be a mapping instead of a simple namespace
This commit changes the options class to be a mapping instead of a simple namespace. While we wanted to preserve attribute based access primarily the simple namespace is too limited in practice and involves a lot of hacking around the internals such as frequent calls to Options.__dict__ to get an iterator of fields in the options. To improve the usability of the class without breaking existing users this changes the base class to be a MutableMapping and adds the necessary methods to make it usable like a dict or a simple namespace.
- Loading branch information
Showing
2 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters