Pep 3105: the end of print?
Steven D'Aprano
steve at REMOVE.THIS.cybersource.com.au
Tue Feb 20 08:02:43 EST 2007
On Tue, 20 Feb 2007 00:44:24 +0000, Peter mayne wrote:
> Steven D'Aprano wrote:
>> If Python 3 dropped the print
>> statement and replaced it with official_print_function(), how would that
>> help you in your goal to have a single code base that will run on both
>> Python 2.3 and Python 3, while still using print?
>
> Is there any reason why official_print_function isn't sys.stdout.write?
Why would you want a convenience function like print to take one import,
three look-ups and 16 characters instead of always available, one look-up
and five characters?
> I can't remember the last time I used print in actual code (apart from
> short-lived debugging lines), so I'm bewildered as to why print seems to
> be so important.
print is important for the convenience, for short-lived debugging, and for
use in the interactive interpreter.
--
Steven.
More information about the Python-list
mailing list