From: Dieter Verfaillie Date: Tue, 20 Nov 2012 06:54:43 +0000 (+0100) Subject: giscanner: use "if in [a, b]" instead of "if == a or if == b" X-Git-Tag: GOBJECT_INTROSPECTION_1_35_3~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6c2ad348892c32a42d112d94168ac071a14c0a2;p=platform%2Fupstream%2Fgobject-introspection.git giscanner: use "if in [a, b]" instead of "if == a or if == b" It simply looks better... https://bugzilla.gnome.org/show_bug.cgi?id=688897 --- diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 764d594..d498913 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -779,7 +779,7 @@ class AnnotationParser(object): # line, we must be parsing the comment block description. #################################################################### if (EMPTY_LINE_RE.search(line) - and (in_part == PART_IDENTIFIER or in_part == PART_PARAMETERS)): + and in_part in [PART_IDENTIFIER, PART_PARAMETERS]): in_part = PART_DESCRIPTION continue @@ -844,7 +844,7 @@ class AnnotationParser(object): # If we get here, we must be in the middle of a multiline # comment block, parameter or tag description. #################################################################### - if in_part == PART_DESCRIPTION or in_part == PART_IDENTIFIER: + if in_part in [PART_IDENTIFIER, PART_DESCRIPTION]: if not comment_block.comment: # Backwards compatibility with old style GTK-Doc # comment blocks where Description used to be a comment