diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-08-15 15:34:25 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-08-15 17:02:12 +0000 |
commit | 8b88eeed5acf03e0b95df6ae19b20777b83ad4fd (patch) | |
tree | 4eff9f6d653aea2c124cc2bf324eddd26a57e3ba /morphlib/morphloader.py | |
parent | 5af964266f74593ebc3b1b1d70625232c49b74da (diff) | |
download | morph-8b88eeed5acf03e0b95df6ae19b20777b83ad4fd.tar.gz |
Use isinstance instead of type when checking morphology object type
Suggested by Richard Maw
Diffstat (limited to 'morphlib/morphloader.py')
-rw-r--r-- | morphlib/morphloader.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/morphloader.py b/morphlib/morphloader.py index db156921..1c016dc9 100644 --- a/morphlib/morphloader.py +++ b/morphlib/morphloader.py @@ -168,7 +168,7 @@ class MorphologyLoader(object): logging.error('Could not load morphology as YAML:\n%s' % str(e)) raise MorphologySyntaxError(whence) - if type(obj) != dict: + if not isinstance(obj, dict): raise NotADictionaryError(whence) return morphlib.morph3.Morphology(obj) |