Most pythonic way of rotating a circular list to a canonical point

Paul Rubin at nospam.invalid
Sun Aug 2 05:02:35 CEST 2015

Paul Rubin < at nospam.invalid> writes:
>   H([b-a, c-b, d-c, a-d])
> where H is your favorite hash function on a list of that element type.

I wrote that up unclearly.  H is supposed to be a hash on one element,
and then you combine H(b-a), H(c-b), etc. in a commutative way, such as
by adding them.  Still not sure if this works though.

More information about the Python-list mailing list