From d3cbc7d14f749a1da97b30c4a2e4c29006701cf8 Mon Sep 17 00:00:00 2001 From: HARI PRASAD L S <06hariumaraja@gmail.com> Date: Sat, 14 Feb 2026 21:58:35 +0530 Subject: [PATCH] Fix mypy issue #20800 --- mypyc/codegen/cstring.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mypyc/codegen/cstring.py b/mypyc/codegen/cstring.py index 853787f8161d4..0220d5b0c24a4 100644 --- a/mypyc/codegen/cstring.py +++ b/mypyc/codegen/cstring.py @@ -31,7 +31,8 @@ # These assignments must come last because we prioritize simple escape # sequences over any other representation. -for c in ("'", '"', "\\", "a", "b", "f", "n", "r", "t", "v"): +for c in ("'", '"', "\\", "a", "b", "f", "n", "r", "t", "v", "0"): + escaped = f"\\{c}" decoded = escaped.encode("ascii").decode("unicode_escape") CHAR_MAP[ord(decoded)] = escaped