Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: jmp Newsgroups: comp.lang.python Subject: Re: Suggested datatype for getting latest information from log files Date: Thu, 11 Feb 2016 19:16:07 +0100 Lines: 13 Message-ID: References: <621f72dc-ad32-48e8-ad37-a2e7eb2d4bd8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de ZCs9TksSa8pKg6S7wCfRngXcW/tqgf/3fRt9fG6H8VEw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:getting': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; 'afterwards': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:log': 0.16; 'unordered': 0.16; 'wrote:': 0.16; 'restrictions': 0.18; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'idea': 0.28; 'concern': 0.29; 'dictionary': 0.29; "i'm": 0.30; 'url:python': 0.33; 'url:org': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'thought': 0.37; 'data': 0.39; 'subject:from': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'your': 0.60; 'received:194': 0.61; 'email addr:gmail.com': 0.62; 'charset:windows-1252': 0.62; 'more': 0.63; 'subject:latest': 0.84; 'trouble.': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: paris.sequans.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <621f72dc-ad32-48e8-ad37-a2e7eb2d4bd8@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102824 On 02/11/2016 07:07 PM, ltomassmail@gmail.com wrote: > I thought a dictionary would be a good idea because of the key restrictions ensuring no duplicates, so the data would always update - However because they are unordered and I need to do some more processing on the data afterwards I'm having trouble. If it's your only concern about using dictionaries, then you may have a look at https://docs.python.org/2/library/collections.html#collections.OrderedDict JM