Skip to content

FunctorCollection class: better _repr__ and __str__

Eduardo Rodrigues requested to merge erodrigu-FunctorCollection-1 into master

This is more pythonic.

Example output for variables_jpsi = FunctorCollection({'LOKI_P': 'P', 'THOR_PT': F.PT}):

# repr
<FunctorCollection: n_thor_fctors=1, n_loki_fctors=1>

# str / print
<FunctorCollection object at 0x7f67cad641c0:
    LOKI_P: P
    THOR_PT: ('::Functors::Track::TransverseMomentum{}', ['Functors/TrackLike.h'], 'PT')
>

Happy to discuss any tweaks :-).

Merge request reports