Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.python Subject: Re: Most pythonic way of rotating a circular list to a canonical point Date: Sat, 01 Aug 2015 20:02:35 -0700 Organization: A noiseless patient Spider Lines: 7 Message-ID: <87pp36jstw.fsf@jester.gateway.sonic.net> References: <873802lm6l.fsf@jester.gateway.sonic.net> <072c7f0b-f636-4c19-8b61-7422b054dcc9@googlegroups.com> <87y4hujtix.fsf@jester.gateway.sonic.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="d4217d68945dedf510265c644f2a7daa"; logging-data="14952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2PUNPqIpa+/I56FD2gUX+" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:6zU6hdmfEL5Q2VF9MediXAZVU9E= sha1:yGOLYyT0NZscNaMeX/of5hzWNzY= Xref: csiph.com comp.lang.python:94884 Paul Rubin 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.