From: Emmanuel Arias Date: Thu, 21 Mar 2019 04:39:17 +0000 (-0300) Subject: bpo-36385: Add ``elif`` sentence on to avoid multiple ``if`` (GH-12478) X-Git-Tag: v3.8.0a3~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed5e29cba500c2336aacdb7c77953f1064235b72;p=thirdparty%2FPython%2Fcpython.git bpo-36385: Add ``elif`` sentence on to avoid multiple ``if`` (GH-12478) Currently, when arguments on Parser/asdl_c.py are parsed ``ìf`` sentence is used. This PR Propose to use ``elif`` to avoid multiple evaluting of the ifs. https://bugs.python.org/issue36385 --- diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 52247559d1a9..4091b6db638c 100644 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -1313,9 +1313,9 @@ if __name__ == "__main__": for o, v in opts: if o == '-h': H_FILE = v - if o == '-c': + elif o == '-c': C_FILE = v - if o == '-d': + elif o == '-d': dump_module = True if H_FILE and C_FILE: print('Must specify exactly one output file')