Files
python-uncompyle6/test/simple_source/stmts/07_withstmt_fn.py
2016-10-24 20:47:12 -04:00

12 lines
391 B
Python

# Python 2.6 has a truly weird way of handling "with" here.
# added rule for 2.6
# setupwith ::= DUP_TOP LOAD_ATTR ROT_TWO LOAD_ATTR CALL_FUNCTION_0 POP_TOP
import sys
from warnings import catch_warnings
with catch_warnings():
if sys.py3kwarning:
sys.filterwarnings("ignore", ".*mimetools has been removed",
DeprecationWarning)
import mimetools