-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed OrderedDict to dict on py>=3.7; Suppressed duplicate exc. mes…
…sage Details: * Starting with Python 3.7, the standard dict is guaranteed to be ordered on all python implementations. Therefore, there is no reason to use OrderedDict anymore on py>=3.7. This change uses dict on py>=3.7 and otherwise OrderedDict for the implementation of NocaseDict. * The issuing of message 'During handling of the above exception, another exception occurred' is now suppressed by setting exc.__cause__ = None. This works on both Python 2 and 3. * Improved the detection of mapping vs iterable as the init argument by generalizing the type checking for mapping to be derived from (NocaseDict, Mapping, UserDict), and to expect an iterable otherwise, failing with TypeError when it cannot be iterated on. * Exception messages have been cleaned up and improved. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
- Loading branch information
1 parent
b041d9f
commit 507b603
Showing
1 changed file
with
70 additions
and
38 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