From 8b88eeed5acf03e0b95df6ae19b20777b83ad4fd Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 15 Aug 2013 15:34:25 +0000 Subject: Use isinstance instead of type when checking morphology object type Suggested by Richard Maw --- morphlib/morphloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'morphlib') 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) -- cgit v1.2.1