[Tutor] The print ogre

Charlie Clark charlie@begeistert.org
Thu, 21 Feb 2002 08:34:41 -0500

>I've used it.  The idea of directly printing to a file isn't the
>problem.  There are times when it's downright handy.  It's the syntax
>that's ogreish (yes that really is a word).  But I've used far uglier
>constructs in other languages so I can live with print >>.
>The trouble is by keeping quiet about it we turn it into the Python
>equivalent of a Playboy magazine.  Sooner or later the newbies are 
>to find it on our bookshelves and then they'll be pulling it out way
>more times than they should!

Good analogy. 
It is indeed the syntax which smells. "print >>" feels like a file 
method but looks like a perl throwback. Where else does ">>" occur in 
Python=3F This is a case of an inefficient signifier.

 "file.print" would be clear and consistent but I don't see anybody 
going for this quickly seeing as "print >>" was only introduced in 
Python 1.6. Or could we go for a PEP=3F