]> granicus.if.org Git - python/commitdiff
bpo-36385: Add ``elif`` sentence on to avoid multiple ``if`` (GH-12478)
authorEmmanuel Arias <emmanuelarias30@gmail.com>
Thu, 21 Mar 2019 04:39:17 +0000 (01:39 -0300)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 21 Mar 2019 04:39:17 +0000 (21:39 -0700)
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

Parser/asdl_c.py

index 52247559d1a937a275e7ea5e384174c199f36d9e..4091b6db638cd6b4629f339481ab19ca12573bc5 100644 (file)
@@ -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')