Is there an easy way to set the default float presentation for Python's format command:
"{:5.3e}".format(a)
so that if the variable a has a value of None instead of a float, some default like 5 spaces might be printed?
The format string can be include many fields and is given by a user. The values in a are calculated internally.