Path: csiph.com!usenet.pasdenom.info!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'url:faqs': 0.09; 'subject: \n ': 0.15; 'lukas': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'rotation': 0.16; 'status?': 0.16; 'url:catb': 0.16; 'wrote:': 0.16; 'circular': 0.18; '2015': 0.20; 'defined': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'subject:list': 0.26; 'header:X-Complaints-To:1': 0.26; 'van': 0.26; 'compare': 0.27; "i'm": 0.30; "i'd": 0.31; 'another': 0.32; 'software,': 0.32; 'problem': 0.33; 'list': 0.34; 'so,': 0.35; 'returning': 0.35; 'something': 0.35; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'expect': 0.37; 'received:org': 0.37; 'sure': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'determine': 0.61; 'no.': 0.62; 'charset:windows-1252': 0.62; 'is.': 0.63; 'saturday,': 0.63; 'august': 0.75; 'received:12': 0.81; 'etc..': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Emile van Sebille Subject: Re: Most pythonic way of rotating a circular list to a canonical point Date: Sat, 1 Aug 2015 14:29:13 -0700 References: <91eed423-5e38-4986-80d9-04d1fc363012@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: www.westernstatesglass.com User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <91eed423-5e38-4986-80d9-04d1fc363012@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1438464606 news.xs4all.nl 2962 [2001:888:2000:d::a6]:51896 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94867 On 8/1/2015 2:12 PM, Lukas Barth wrote: > On Saturday, August 1, 2015 at 10:51:03 PM UTC+2, Emile van Sebille wrote: >> Is the problem to determine if one list of circular numbers 'matches' >> another one despite rotation status? If so, I'd do something like: > > Well.. no. I actually really need this "canonical" rotation, since I'm hashing this, returning it to other parts of the software, etc.. Then I'm not sure that I understand what exactly the problem is. Can you state it in terms of what you start with and what you expect to get? The only clue I see is "Now I want to rotate these to a well defined status, so that I can can compare them." Which is where I understood you to want to compare them. You might check at http://www.catb.org/esr/faqs/smart-questions.html Emile