Use io.StringIO instead of the StringIO module

This commit is contained in:
Kodi Arfer 2018-03-04 16:46:48 -08:00
parent ca06294c18
commit 4c5dea0756

View File

@ -50,7 +50,7 @@ def isidentifier(x):
if x.rstrip() != x: if x.rstrip() != x:
return False return False
import tokenize as T import tokenize as T
from StringIO import StringIO from io import StringIO
try: try:
tokens = list(T.generate_tokens(StringIO(x).readline)) tokens = list(T.generate_tokens(StringIO(x).readline))
except T.TokenError: except T.TokenError: