Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54841 > unrolled thread

Re: Convert namedtuple to dictionary

Started byVirendra Tripathi <virendra.tripathi@maansystems.com>
First post2013-09-26 17:13 +0000
Last post2013-09-26 17:13 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Re: Convert namedtuple to dictionary Virendra Tripathi <virendra.tripathi@maansystems.com> - 2013-09-26 17:13 +0000

#54841 — Re: Convert namedtuple to dictionary

FromVirendra Tripathi <virendra.tripathi@maansystems.com>
Date2013-09-26 17:13 +0000
SubjectRe: Convert namedtuple to dictionary
Message-ID<mailman.361.1380215641.18130.python-list@python.org>
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


[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web