[Python-Dev] Replacement for print in Python 3.0

Neil Hodgson nyamatongwe at gmail.com
Fri Sep 2 14:06:17 CEST 2005


Gareth McCaughan:

> 3. It's convenient for debugging, interactive use, simple scripts,
>    and various other things.

   Interactive use is its own mode and works differently to the base
language. To print the value of something, just type an expression.
Python will evaluate and print the value of the expression. Much
easier than adding 'print '. Extended interactive modes like ipython
include other conveniences that don't belong in the python language.

   The problem with print is it becomes a barrier to extending a
script into something more ambitious. This then leads to ugly
'features' like '>>' and trailing commas. By all means provide a
simple syntax for i/o with the standard streams but ensure it is
something that is a firm basis for extension.

   Neil


More information about the Python-Dev mailing list