Fix a ResourceWarning in generate_opcode_h.py
Use a context manager to close the Python file. Replace also open() with tokenize.open() to handle coding cookie if any in Lib/opcode.py.
Showing
Please
register
or
sign in
to comment
Use a context manager to close the Python file. Replace also open() with tokenize.open() to handle coding cookie if any in Lib/opcode.py.