Use io.StringIO instead of the StringIO module
This commit is contained in:
parent
ca06294c18
commit
4c5dea0756
@ -50,7 +50,7 @@ def isidentifier(x):
|
||||
if x.rstrip() != x:
|
||||
return False
|
||||
import tokenize as T
|
||||
from StringIO import StringIO
|
||||
from io import StringIO
|
||||
try:
|
||||
tokens = list(T.generate_tokens(StringIO(x).readline))
|
||||
except T.TokenError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user