[Python-checkins] CVS: python/dist/src/Python ceval.c,2.197,2.198
Barry Warsaw
python-dev@python.org
Mon, 28 Aug 2000 21:56:17 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv31640
Modified Files:
ceval.c
Log Message:
eval_code2(): Guido provides this patch for his suggested elaboration
of extended print. If the file object being printed to is None, then
sys.stdout is used.
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.197
retrieving revision 2.198
diff -C2 -r2.197 -r2.198
*** ceval.c 2000/08/27 20:31:27 2.197
--- ceval.c 2000/08/29 04:56:13 2.198
***************
*** 1231,1235 ****
case PRINT_ITEM:
v = POP();
! if (stream == NULL) {
w = PySys_GetObject("stdout");
if (w == NULL) {
--- 1231,1235 ----
case PRINT_ITEM:
v = POP();
! if (stream == NULL || stream == Py_None) {
w = PySys_GetObject("stdout");
if (w == NULL) {
***************
*** 1264,1268 ****
case PRINT_NEWLINE:
! if (stream == NULL) {
w = PySys_GetObject("stdout");
if (w == NULL)
--- 1264,1268 ----
case PRINT_NEWLINE:
! if (stream == NULL || stream == Py_None) {
w = PySys_GetObject("stdout");
if (w == NULL)