print() in Python 3000 return value?

Atanas Banov enterr at gmail.com
Sun Apr 2 17:24:25 EDT 2006


James Thiele wrote:
> I noticed in PEP 3000 that print will become a function. The PEP
> references a thread where Guido explains this decision. The thread does
> not specify what the function will return. Has this been decided?

reading the discussion, the arguments are about "print" as of now being
a syntactic construc, an operator without apparent reason. all that is
proposed is to tuck it as a function/procedure, i.e. use parenthesis
and be able to redefine with a simple def print(...)

if you think about it, the pythonic way is for print to return None. we
use it for the side effect (stdout output)




More information about the Python-list mailing list