python at mrabarnett.plus.com
Fri Nov 1 03:01:30 CET 2013
On 01/11/2013 01:45, Mark Lawrence wrote:
> Quite often I type this
> print('Total of accounts %.2f', total)
> when I meant to type this
> print('Total of accounts %.2f' % total)
> Do I have to raise a PEP to get this stupid language changed so that it
> dynamically recognises what I want it to do and acts accordingly?
> Yours most frustratedly.
Could something like pylint recognise a format string literal as the
first argument of 'print' and warn if it's followed by a comma?
More information about the Python-list