[Python-Dev] Challenge about print >> None
Just van Rossum
Wed, 13 Sep 2000 09:33:15 +0100
Vladimir Marangozov wrote:
>And let me add to that the following summary: the whole extended
>print idea is about convenience. Convenience for those that know
>what file redirection is. Not for newbies. You can't argue too much
>about extended print as an intuitive concept for newbies.
That's exactly what disturbs me, too. The main reason for the extended
print statement is to make it easier for newbies to solve this problem "ok,
now how do I print to a file other than sys.stdout?". The main flaw in this
reasoning is that a newbie doesn't neccesarily realize that when you print
something to the screen it actually goes through a _file_ object, so is
unlikely to ask that question. Or the other way round: someone asking that
question can hardly be considered a newbie. It takes quite a bit of
learning before someone can make the step from "a file is a thing on my
hard drive that stores data" to "a file is an abstract stream object". And
once you've made that step you don't really need extended print statement
that badly anymore.
>change disturbs experienced users (the >> syntax aside) and you get
>signals about that from them, because the current behavior does not
>comply with any existing concept as far as file redirection is concerned.
>However, since these guys are experienced and knowledgable, they already
>understand this game quite well. So what you get is just "Oh really? OK,
>this is messy" from the chatty ones and everybody moves on. The others
>just don't care, but they not necessarily agree.