Negative integers and string formating

Paul Rubin http
Tue Oct 24 03:56:21 CEST 2006


Steven D'Aprano <steve at REMOVEME.cybersource.com.au> writes:
> def display(**kwargs):
>     fs = format(kwargs['argument'])
>     return fs % kwargs

 def display(**kwargs):
     fs = format(kwargs['argument'])
     return fs % dict((x, abs(y)) for x,y in kwargs.iteritems())



More information about the Python-list mailing list