bpo-45562: Only show debug output from the parser in debug builds (GH… · python/cpython@ae78ffd

Original file line numberDiff line numberDiff line change

@@ -1042,11 +1042,13 @@ tok_nextc(struct tok_state *tok)

10421042

else {

10431043

rc = tok_underflow_file(tok);

10441044

}

1045+

#if defined(Py_DEBUG)

10451046

if (Py_DebugFlag) {

10461047

printf("line[%d] = ", tok->lineno);

10471048

print_escape(stdout, tok->cur, tok->inp - tok->cur);

10481049

printf(" tok->done = %d\n", tok->done);

10491050

}

1051+

#endif

10501052

if (!rc) {

10511053

tok->cur = tok->inp;

10521054

return EOF;