Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63093
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Creating a list with holes |
| Date | 2014-01-03 20:18 -0500 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-06CDBC.20180603012014@news.panix.com> (permalink) |
| References | <mailman.4852.1388762356.18130.python-list@python.org> <c37ad1f1-1367-4de0-9a2e-bc60355abea3@googlegroups.com> <mailman.4856.1388763689.18130.python-list@python.org> <la6u8e$lf9$3@dont-email.me> <mailman.4871.1388794533.18130.python-list@python.org> |
In article <mailman.4871.1388794533.18130.python-list@python.org>, Larry Martell <larry.martell@gmail.com> wrote: > > Thanks, but I know all that about dicts. I need to use a list for > compatibility with existing code. Generalizing what I think the situation is, "A dict is the best data structure for the parsing phase, but I need a list later to hand off to legacy interfaces". No problem. Parse the data using a dict, then convert the dict to a list later. I haven't been following all the details here, but just wanted to point out that using different data structures to hold the same data at different phases of a program is a perfectly reasonable approach.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Creating a list with holes Larry Martell <larry.martell@gmail.com> - 2014-01-03 10:19 -0500
Re: Creating a list with holes eneskristo@gmail.com - 2014-01-03 07:30 -0800
Re: Creating a list with holes Larry Martell <larry.martell@gmail.com> - 2014-01-03 10:41 -0500
Re: Creating a list with holes Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-03 18:07 +0000
Re: Creating a list with holes Larry Martell <larry.martell@gmail.com> - 2014-01-03 19:15 -0500
Re: Creating a list with holes Roy Smith <roy@panix.com> - 2014-01-03 20:18 -0500
Re: Creating a list with holes Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-04 02:03 +0000
Re: Creating a list with holes Roy Smith <roy@panix.com> - 2014-01-03 10:38 -0500
Re: Creating a list with holes Chris Angelico <rosuav@gmail.com> - 2014-01-04 02:46 +1100
csiph-web