1. Pypy
  2. Untitled project
  3. pypy

Source

pypy / lib-python / 3.2 / tokenize.py

Diff from to

File lib-python/3.2/tokenize.py

  • Ignore whitespace
 from token import *
 from codecs import lookup, BOM_UTF8
 import collections
-import io
+from io import TextIOWrapper
 cookie_re = re.compile("coding[:=]\s*([-\w.]+)")
 
 import token
     """Open a file in read only mode using the encoding detected by
     detect_encoding().
     """
-    buffer = io.open(filename, 'rb')
+    buffer = builtins.open(filename, 'rb')
     encoding, lines = detect_encoding(buffer.readline)
     buffer.seek(0)
-    text = io.TextIOWrapper(buffer, encoding, line_buffering=True)
+    text = TextIOWrapper(buffer, encoding, line_buffering=True)
     text.mode = 'r'
     return text