Negative integers and string formating

Paul Rubin http
Mon Oct 23 21:56:21 EDT 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