mirror of
https://github.com/python/cpython
synced 2024-09-06 06:44:22 +00:00
gh-105324: Fix tokenize module main function for stdin (#105325)
This commit is contained in:
parent
677cf39741
commit
f04c16875b
|
@ -490,8 +490,7 @@ def error(message, filename=None, location=None):
|
|||
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
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix the main function of the :mod:`tokenize` module when reading from
|
||||
``sys.stdin``. Patch by Pablo Galindo
|
Loading…
Reference in a new issue