[Tutor] The 'print >>' ogre

Pijus Virketis virketis@fas.harvard.edu
Sun, 17 Feb 2002 14:36:49 -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 >>.

I personally rather like the >> ogre. Has no one else seen Shrek here? :) I
also remember reading a small article by Guido on the python.org website
after the first version of Python with the feature came out, where he
highlighted it, along with "+=" operators, as features often requested and
used by programmers. But, if you don't dig it, what would be a more
Pythonesque way of accomplishing the same task? If you had to do a PEP, what
syntactical alternatives would you propose?