]> granicus.if.org Git - python/commit
Modernize Python/makeopcodetargets.py
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 25 Mar 2016 10:54:47 +0000 (11:54 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 25 Mar 2016 10:54:47 +0000 (11:54 +0100)
commita9a852c2b123031febf245d3bd37a529e0635d01
treeec082a8bea9d540770ecb74b49ba30b6f9530b26
parente77c974357fa96917e6966d627a69eae8a919b37
Modernize Python/makeopcodetargets.py

* Simply use "import opcode" to import the opcode module instead of tricks
  using the imp module
* Use context manager for the output file
* Move code into a new main() function
* Replace assert with a regular if to check the number of arguments
* Import modules at top level
Python/makeopcodetargets.py