Skip to content

Commit

Permalink
bpo-36385: Add elif sentence on to avoid multiple if (pythonG…
Browse files Browse the repository at this point in the history
…H-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
  • Loading branch information
eamanu authored and miss-islington committed Mar 21, 2019
1 parent 2afb598 commit ed5e29c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Parser/asdl_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,9 +1313,9 @@ def main(srcfile, dump_module=False):
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')
Expand Down

0 comments on commit ed5e29c

Please sign in to comment.