bpo-45562: Ensure all tokenizer debug messages are printed to stderr … · python/cpython@cdc7a58

Original file line numberDiff line numberDiff line change

@@ -1048,7 +1048,7 @@ tok_nextc(struct tok_state *tok)

10481048

#if defined(Py_DEBUG)

10491049

if (Py_DebugFlag) {

10501050

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

1051-

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

1051+

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

10521052

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

10531053

}

10541054

#endif