Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54841
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <virendra.tripathi@maansystems.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.071 |
| X-Spam-Evidence | '*H*': 0.86; '*S*': 0.00; 'guys.': 0.09; 'dynamic,': 0.16; 'i.e.,': 0.16; 'received:169.254.11': 0.16; 'subject:Convert': 0.16; 'thanks,': 0.17; 'thanks.': 0.20; 'to:name:python-list@python.org': 0.22; 'values': 0.27; "skip:' 10": 0.31; 'tuples': 0.31; 'received:169.254': 0.32; 'sense': 0.34; 'could': 0.34; 'but': 0.35; 'in.': 0.36; 'in:': 0.36; 'next': 0.36; 'thanks': 0.36; "i'll": 0.36; 'should': 0.36; 'received:169': 0.37; 'received:10': 0.37; 'same.': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'mentioned': 0.61; 'charset:windows-1252': 0.65; 'received:10.242': 0.84 |
| From | Virendra Tripathi <virendra.tripathi@maansystems.com> |
| To | "python-list@python.org" <python-list@python.org> |
| Subject | Re: Convert namedtuple to dictionary |
| Thread-Topic | Convert namedtuple to dictionary |
| Thread-Index | AQHOutvDw6fJGBLE50m0NY8GAfmLOg== |
| Date | Thu, 26 Sep 2013 17:13:47 +0000 |
| Accept-Language | en-US |
| Content-Language | en-US |
| X-MS-Has-Attach | |
| X-MS-TNEF-Correlator | |
| x-originating-ip | [64.71.23.190] |
| x-forefront-prvs | 0981815F2F |
| x-forefront-antispam-report | SFV:NSPM; SFS:(199002)(189002)(164054003)(83322001)(80976001)(74706001)(74662001)(4396001)(74502001)(31966008)(46102001)(47976001)(47446002)(74876001)(65816001)(80022001)(81816001)(33656001)(81686001)(81342001)(81542001)(63696002)(47736001)(49866001)(53806001)(69226001)(56776001)(54316002)(77096001)(83072001)(74366001)(66066001)(76796001)(76482001)(56816003)(76786001)(51856001)(82746002)(77982001)(50986001)(36756003)(76176001)(59766001)(79102001)(54356001)(83716002); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR04MB255; H:BY2PR04MB255.namprd04.prod.outlook.com; CLIP:64.71.23.190; FPR:; RD:InfoNoRecords; A:1; MX:1; LANG:en; |
| Content-Type | text/plain; charset="Windows-1252" |
| Content-ID | <DA3DD65E05ED0F43B790FBBA46581EFF@namprd04.prod.outlook.com> |
| Content-Transfer-Encoding | quoted-printable |
| MIME-Version | 1.0 |
| X-OriginatorOrg | maansystems.com |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.361.1380215641.18130.python-list@python.org> (permalink) |
| Lines | 20 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1380215641 news.xs4all.nl 15951 [2001:888:2000:d::a6]:43825 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:54841 |
Show key headers only | View raw
Hi MRAB, Thanks. Learning a lot thanks to you guys. I should have mentioned that the data is dynamic, in the sense that 'brucelee' could be 'jackiechan' , the number of named tuples - i.e., 'brucelee(…)', could change as well, the next time data is pulled in. The format of the data would however remain the same. I am using @Tim Chase's solution for now. Your solution will also work but I think I'll need to create a fn to pull out the " n " values as in: ">>> n = brucelee(x=123, y=321)" Thanks, Virendra
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Convert namedtuple to dictionary Virendra Tripathi <virendra.tripathi@maansystems.com> - 2013-09-26 17:13 +0000
csiph-web