summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-06-05 16:36:40 (GMT)
committerGitHub <noreply@github.com>2023-06-05 16:36:40 (GMT)
commitf04c16875b649e2c2b420eb146308d0206c7e527 (patch)
tree01e8926bc3856d2b1c95335a9484267215ceff95 /Lib
parent677cf3974190f1f627ff63cc6c8777d7f390e47b (diff)
downloadcpython-f04c16875b649e2c2b420eb146308d0206c7e527.zip
cpython-f04c16875b649e2c2b420eb146308d0206c7e527.tar.gz
cpython-f04c16875b649e2c2b420eb146308d0206c7e527.tar.bz2
gh-105324: Fix tokenize module main function for stdin (#105325)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/tokenize.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index 380dc2a..a07a8bf 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -490,8 +490,7 @@ def main():
else:
filename = "<stdin>"
tokens = _generate_tokens_from_c_tokenizer(
- (x.encode('utf-8') for x in iter(sys.stdin.readline, "")
- ), "utf-8", extra_tokens=True)
+ sys.stdin.readline, extra_tokens=True)
# Output the tokenization