cliff/releasenotes/notes/comparable-FormattableColumn-31c0030ced70b7fb.yaml
Stephen Finucane c1c991045c Make 'FormattableColumn' comparable
Implement the '__lt__' magic method, thus providing the minimal set of
rich comparison methods necessary to support sorting. This will allows
users using these formatters for the more basic types (i.e. not dicts)
to sort their output using the standard '--sort-column' option.

Change-Id: I08e1f1bc75fa6452f19dfb9d221c1daec194d58d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-29 15:40:42 +00:00

10 lines
426 B
YAML

---
features:
- |
Instances of ``cliff.columns.FormattableColumn`` are now comparable. This
allows implementations of ``FormattableColumn`` storing primitive data
types or containers with primitive data types to be sorted using the
``--sort-column`` option. Implementations of ``FormattableColumn`` that
store other types of data will still need to implement their own rich
comparison magic methods.