astropy/astropy — pull request #2898 by mhvk (2014-08-27 20:34:33+00:00)
Title: Simplify table column format definition?

Following discussion in #2896: Currently, column formats can be set by either giving a string or a function [1], with the string an old or new-style format, e.g., `'%5.2f'` or `'{:5.2f}'`. It would seem more logical if the user would not have to care how typesetting is done in python and could just give the actual format specifier (i.e., just `'5.2f'`). This would leave the string format very simple, equal to what one would guess with the most careless thought. It would also be easy to describe in the documentation, as it would just be equal to what needs to be passed in to the `format` function. Specifically, in `pprint._auto_format_func`, one would the format function would be defined as
```
lambda format_, val: format(val, format_)
```
instead of the current
```
lambda format_, val: format_.format(val)
```

If the above makes sense, I'm happy to turn this into a PR. @taldcroft?

[1] http://astropy.readthedocs.org/en/latest/table/construct_table.html#format-specifier