-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added DefaultMunch, which returns a special value for missing attributes
- Added a subclass of Munch, DefaultMunch, which returns a user- defined value when a requested key is not in the collection. The interface and behaviour is similar to collections.defaultdict, except that: - Only a constant value is returned; there is no default_factory method. - Retrieval of a missing value does not change the size of the collection.
- Loading branch information
Alex Fraser
committed
Jul 3, 2017
1 parent
e323f44
commit fb0a119
Showing
4 changed files
with
159 additions
and
12 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
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