PEP 378: Format Specifier for Thousands Separator

Carlos Nepomuceno carlosnepomuceno at outlook.com
Wed May 22 18:31:20 EDT 2013


----------------------------------------
> Date: Wed, 22 May 2013 13:26:23 -0700
> Subject: Re: PEP 378: Format Specifier for Thousands Separator
> From: pruebauno at latinmail.com
> To: python-list at python.org
[...]
>
> Maybe a cformat(formatstring, variables) function should be created
> in the string module so people who prefer that can use it. I don't
> mind the C formatting syntax but I don't like the fact that the %
> operator does something totally different when the first variable is
> an integer and the fact that it misbehaves if the second variable is a
> tuple.
> --
> http://mail.python.org/mailman/listinfo/python-list

I still don't understand why % benefits from literals optimization ("'%d'%12345") while '{:d}'.format(12345) doesn't.

What "totally different" you talking about? Please give me an example. 		 	   		  


More information about the Python-list mailing list