summaryrefslogtreecommitdiffstats
path: root/Lib/tokenize.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-05 19:44:20 (GMT)
committerGitHub <noreply@github.com>2023-06-05 19:44:20 (GMT)
commit3aa3be4fe3f64ccaf2b6235bd3addeb5c1313002 (patch)
tree273783cbd901f9861ed4b02bd0f276834b423fad /Lib/tokenize.py
parentab660e9a53090f6b00b33ff0633b0388355f4c4a (diff)
downloadcpython-3aa3be4fe3f64ccaf2b6235bd3addeb5c1313002.zip
cpython-3aa3be4fe3f64ccaf2b6235bd3addeb5c1313002.tar.gz
cpython-3aa3be4fe3f64ccaf2b6235bd3addeb5c1313002.tar.bz2
[3.12] gh-105324: Fix tokenize module main function for stdin (GH-105325) (#105330)
Diffstat (limited to 'Lib/tokenize.py')
-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