[Python-Dev] Challenge about print >> None

Greg Ward gward@mems-exchange.org
Thu, 14 Sep 2000 09:13:27 -0400


Oops.  Forgot to cast my votes:

+1 on redirectable print
-0 on the particular syntax chosen (not that it matters now)
-1 on None == sys.stdout (yes, I know it's more subtle than that,
      but that's just what it looks like)

IMHO "print >>None" should have the same effect as "print >>37" or
"print >>'foo'":

  ValueError: attempt to print to a non-file object

(as opposed to "print to file descriptor 37" and "open a file called
'foo' in append mode and write to it", of course.  ;-)

        Greg