gratuitous new features in 2.0

Johann Hibschman johann at physics.berkeley.edu
Sun Aug 27 05:18:09 EDT 2000


Guido van Rossum writes:

> If I had to choose between 'print in file' and 'print >> file' I would
> definitely choose '>>'.  In part because 'in' would be a new invention
> (I know of no other language that uses it, while '>>' is used in sh,
> awk, Perl, and C++), in part because '>>', being non-alphabetic,
> stands out more so is more likely to catch the reader's attention.

Is there any reason not to simply use 'print >file'?  I find the '>>'
form to be too loud, because '>' is sharp as it is and doubling it
simply accents the lines even further.

'>>' makes perhaps most sense as 'redirect and append', but I imagine
'>' is more common in day-to-day shell use and is thus associated more
strongly with the idea of 'redirect to' in the mind of sh users.

And, perhaps, some of the reaction to >> is due to memories of C++
syntax which people want to avoid...

--J

-- 
Johann Hibschman                           johann at physics.berkeley.edu



More information about the Python-list mailing list