of extended print. If the file object being printed to is None, then
sys.stdout is used.
case PRINT_ITEM:
v = POP();
- if (stream == NULL) {
+ if (stream == NULL || stream == Py_None) {
w = PySys_GetObject("stdout");
if (w == NULL) {
PyErr_SetString(PyExc_RuntimeError,
/* fall through to PRINT_NEWLINE */
case PRINT_NEWLINE:
- if (stream == NULL) {
+ if (stream == NULL || stream == Py_None) {
w = PySys_GetObject("stdout");
if (w == NULL)
PyErr_SetString(PyExc_RuntimeError,