[Python-3000] print() parameters in py3k
Barry Warsaw
barry at python.org
Tue Nov 21 14:37:49 CET 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Nov 21, 2006, at 6:05 AM, Fredrik Lundh wrote:
> 2) for convenience, extend print to treat a format object as a format
> specifier for the following arguments:
>
> print (x, y, z, fmt="My X: %s, Your Y: %s, His Z: %s")
>
> becomes
>
> print(format("My X: %s, Your Y: %s, His Z: %s"), x, y ,z)
>
> 3) get rid of printf.
That's not bad. Is the format object allowed in any positional
argument, or just the first?
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRWMBLnEjvBPtnXfVAQIPkQQAo9LHQIzIJnQ1AK7b2OqWKSEfReDQbaEd
7rVVjaYQEb9yuMmAdBEH1HzgA/llSEt4hwY/A7QM079rXTvikcNDQZOc6ATzOGIw
mBkRDizn2Z7XKluODe+zr0NOk74Phiv03CYBvlEoYVLUQSNBKI4EFKBmclmx+YsC
LR2FUmV5enU=
=f6RC
-----END PGP SIGNATURE-----
More information about the Python-3000
mailing list