Adding a leading space to float formatting of positive numbers to improve alignment.

Mon, 29 Apr 2013 14:59:23 +0200

author
Andy Buckley <andy@insectnation.org>
date
Mon, 29 Apr 2013 14:59:23 +0200
changeset 213
11aef4bd7802
parent 212
3a6db3deedef
child 214
fa07ed634b18

Adding a leading space to float formatting of positive numbers to improve alignment.

ChangeLog file | annotate | diff | comparison | revisions
pyslha.py file | annotate | diff | comparison | revisions
     1.1 --- a/ChangeLog	Mon Apr 29 14:55:44 2013 +0200
     1.2 +++ b/ChangeLog	Mon Apr 29 14:59:23 2013 +0200
     1.3 @@ -1,5 +1,8 @@
     1.4  2013-04-29  Andy Buckley  <andy.buckley@cern.ch>
     1.5  
     1.6 +	* Adding a leading space to float formatting of positive numbers
     1.7 +	to improve alignment.
     1.8 +
     1.9  	* Clean-up of precision formatting in output.
    1.10  
    1.11  	* Split writeSLHA implementation into distinct writeSLHA{Blocks,Decays}.
     2.1 --- a/pyslha.py	Mon Apr 29 14:55:44 2013 +0200
     2.2 +++ b/pyslha.py	Mon Apr 29 14:59:23 2013 +0200
     2.3 @@ -79,7 +79,7 @@
     2.4  def _autostr(var, precision=8):
     2.5      """Automatically format numerical types as the right sort of string."""
     2.6      if type(var) is float:
     2.7 -        return ("%." + str(precision) + "e") % var
     2.8 +        return ("% ." + str(precision) + "e") % var
     2.9      return str(var)
    2.10  
    2.11  

mercurial