PEP 378: Format Specifier for Thousands Separator

Carlos Nepomuceno carlosnepomuceno at outlook.com
Thu May 23 11:26:49 EDT 2013


----------------------------------------
> Date: Thu, 23 May 2013 06:44:05 -0700
> Subject: Re: PEP 378: Format Specifier for Thousands Separator
> From: pruebauno at latinmail.com
> To: python-list at python.org
[...]
>>>> eggs(a,f)
> Traceback (most recent call last):
> File "<pyshell#29>", line 1, in <module>
> eggs(a,f)
> File "<pyshell#1>", line 1, in eggs
> def eggs(spam, ham): return spam % ham
> TypeError: not all arguments converted during string formatting
>>>> '%s'%(5%3)
> '2'

So % doesn't handle tuples! Why's that? Is it intentional (by design)? 		 	   		  


More information about the Python-list mailing list