[Python-3000] print() parameters in py3k

Barry Warsaw barry at python.org
Mon Nov 20 21:13:58 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 20, 2006, at 2:52 PM, Guido van Rossum wrote:

> I still don't quite see how making print a callable object solves that
> issue.

It solves it by making the stream an attribute on the callable  
instead of an argument to the call.

> But personally would be totally happy with "You can't use
> 'file' as a variable name in your format". ('end' and 'sep' should not
> be supported by printf(), these should just be made part of the format
> string.)

If 'file' is the only special keyword argument to printf, then let's  
call it '_file' or some such.  There's probably less chance that a  
newbie will want to change the output stream than they'll want to use  
a file variable in their format string.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iQCVAwUBRWIMi3EjvBPtnXfVAQJ2aQP/Qcq+J5ZN0p6aH0QJSO5W7HpJ/MpBQCWu
vRQTu13NHFscPNIC3SFvRIg/QPZdpMYSpEUZSl4BUuQMp+MEGSSKKFbq14DyDTfV
O7VZ8QjN94EL410cZAHS2PZSZzGo0eG96zwSiGkEK+pjuKVwML+nTSq0xQqJF8Yu
w7btiFT/ThY=
=SxCt
-----END PGP SIGNATURE-----


More information about the Python-3000 mailing list