From 1e6bc3af88fa425bbd1685483c9b4cd047939322 Mon Sep 17 00:00:00 2001 From: Eddy Mulyono Date: Wed, 21 May 2025 16:12:07 -0400 Subject: [PATCH] gh-60427: Lib/tokenize.py (untokenize): Update docstring about returning str --- Lib/tokenize.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/tokenize.py b/Lib/tokenize.py index 8d01fd7bce41b0..8ef012a8bf1d5b 100644 --- a/Lib/tokenize.py +++ b/Lib/tokenize.py @@ -327,6 +327,7 @@ def untokenize(iterable): """Transform tokens back into Python source code. It returns a bytes object, encoded using the ENCODING token, which is the first token sequence output by tokenize. + If there is no encoding token in the input, it returns a str instead. Each element returned by the iterable must be a token sequence with at least two elements, a token number and token value. If