Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102827
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2016-02-11 10:25 -0800 |
| References | <621f72dc-ad32-48e8-ad37-a2e7eb2d4bd8@googlegroups.com> <mailman.57.1455214580.22075.python-list@python.org> |
| Message-ID | <fdff52e9-da6d-4a0d-b3e7-19d92e2793d5@googlegroups.com> (permalink) |
| Subject | Re: Suggested datatype for getting latest information from log files |
| From | ltomassmail@gmail.com |
On Thursday, February 11, 2016 at 6:16:35 PM UTC, jmp wrote:
> 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
I did look into that but I'm trying to do something like this which doesn't work - I guess I'm struggling a little with the implementation.
fillinfo = {}
fillInfo['name'] = OrderedDict('info1','info2','info3','info4','info5',)
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Suggested datatype for getting latest information from log files ltomassmail@gmail.com - 2016-02-11 10:07 -0800
Re: Suggested datatype for getting latest information from log files jmp <jeanmichel@sequans.com> - 2016-02-11 19:16 +0100
Re: Suggested datatype for getting latest information from log files ltomassmail@gmail.com - 2016-02-11 10:25 -0800
Re: Suggested datatype for getting latest information from log files ltomassmail@gmail.com - 2016-02-11 10:31 -0800
Re: Suggested datatype for getting latest information from log files "Martin A. Brown" <martin@linux-ip.net> - 2016-02-11 10:58 -0800
Re: Suggested datatype for getting latest information from log files Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-02-11 20:19 -0500
csiph-web