[Python-Dev] extended print statement, uPre-PEP
email@example.com (Skip Montanaro)
Sun, 23 Jul 2000 23:24:16 -0500 (CDT)
Paul> I think it is also worthwhile to recognize "conventions" that
Paul> could be made clearer with first-class syntax. List comprehensions
Paul> replace the map/lambda convention (and would IMHO, allow
Paul> map/filter, at-least, to be deprecated). Range literals replace
Paul> the for i in range(...) convention and so forth.
Range literals would also allow compilers such as Python2C to optimize
Python ints to C ints. It can't do this today without assuming that range()
and xrange return a sequence of ints.
I guess I'll stick my neck way out there with Barry and say I rather like
his "print @" proposal. Most new Python programmers learn about print
earlier than a combination of somefile.write() + the "%" operator. While it
might mostly be syntactic sugar, it is generally easier for new folks to
understand. I suspect (though won't bother to check) that most of the I/O
in the Python tutorial uses print instead of sys.stdout.write as well.
Extending print's semantics to other file-like objects makes sense to me.
Skip Montanaro, firstname.lastname@example.org, http://www.mojam.com/, http://www.musi-cal.com/
"To get what you want you must commit yourself for sometime" - fortune cookie