[Python-checkins] Don't print rejected tokens when using the debug flags in the parser (GH-31258)

pablogsal webhook-mailer at python.org
Thu Feb 10 09:38:39 EST 2022


https://github.com/python/cpython/commit/e19059ecd80d39dca378cd19f72c5008b1957976
commit: e19059ecd80d39dca378cd19f72c5008b1957976
branch: main
author: Pablo Galindo Salgado <Pablogsal at gmail.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2022-02-10T14:38:27Z
summary:

Don't print rejected tokens when using the debug flags in the parser (GH-31258)

files:
M Parser/pegen.c

diff --git a/Parser/pegen.c b/Parser/pegen.c
index 839ffeff76fb1..95dc54dd6040f 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -381,7 +381,6 @@ _PyPegen_expect_token(Parser *p, int type)
     }
     Token *t = p->tokens[p->mark];
     if (t->type != type) {
-        if (Py_DebugFlag) fprintf(stderr, "Token = %s\n", PyBytes_AsString(t->bytes));
         return NULL;
     }
     p->mark += 1;



More information about the Python-checkins mailing list