atcollab / at

Accelerator Toolbox
Apache License 2.0
48 stars 31 forks source link

Restore the standard behaviour of reversed(Lattice) #589

Closed lfarv closed 1 year ago

lfarv commented 1 year ago

This PR restores the standard behaviour of the reversed() iterator for Lattice objects: the behaviour introduced in #573 could be confusing, since it was iterating on copies of the elements instead of element themselves.

As a consequence, the only way to build reversed lattices by swapping entrance and exit faces is to use the Lattice.reversed() method.

swhite2401 commented 1 year ago

Ok thanks for the clarification, all good for me!