iterators (was: python-dev summary)
skip at mojam.com
Fri Feb 16 19:35:37 CET 2001
Andrew> I see similar problems with ">>" and now with "k:v" iterators.
Andrew> These all mean there will be multiple ways to do the same task.
The ">>" syntax can actually be thought of as reducing the number of
(standard) ways of printing. Previously, you could use the print statement
for straightforward output (but only to sys.stdout), but if you wanted to
write to anything besides sys.stdout, you generally were forced to use
file's write method. Now you have your choice: straightforward output or
finegrained control of output. If your scientist friends are comfortable
with print, there's no need to introduce them to the more complex use of
write methods and the % formatting operator.
No comment on the k:v iterator. I don't believe that's a done deal.
Skip Montanaro (skip at mojam.com)
Support Mojam & Musi-Cal: http://www.musi-cal.com/sponsor.shtml
More information about the Python-list