Neil Cerutti wrote, on Wednesday, June 07, 2017 10:36 AM
>
> On 2017-06-06, Deborah Swanson wrote:
> >> I too have sometimes started with a namedtuple and then found I
> >> needed to make changes to the records. I typically abandon
> namedtuple
> >> at this point, after only one bad experience
On 2017-06-06, Deborah Swanson wrote:
>> I too have sometimes started with a namedtuple and then found
>> I needed to make changes to the records. I typically abandon
>> namedtuple at this point, after only one bad experience trying
>> to work around my choice of container.
>
> I can appreciate th
Richard Moseley wrote, on Tuesday, June 06, 2017 8:16 AM
>
> On 06/06/17 13:29, Neil Cerutti wrote:
> > On 2017-06-06, Deborah Swanson wrote:
> >> I have a list of namedtuples:
> >>
> >>[{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')
> >>. . .
> >>{Record}(r0=v0, r1=v1,..
Neil Cerutti wrote, on Tuesday, June 06, 2017 5:29 AM
>
> On 2017-06-06, Deborah Swanson wrote:
> > I have a list of namedtuples:
> >
> > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')
> > . . .
> > {Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')]
> >
> > In the fir
Peter Otten wrote, on Tuesday, June 06, 2017 1:31 AM
>
> Deborah Swanson wrote:
>
> > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')
>
> Lovely column names ;)
Not very sexy names, I agree ;)
The columns do have real names. The first 10 are friendly and
semi-friendly names, but the na
On 06/06/17 13:29, Neil Cerutti wrote:
On 2017-06-06, Deborah Swanson wrote:
I have a list of namedtuples:
[{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')
. . .
{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')]
In the first section of code, I process so
On 2017-06-06, Deborah Swanson wrote:
> I have a list of namedtuples:
>
> [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')
> . . .
> {Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')]
>
> In the first section of code, I process some of the first 10
> columns (r0=v0
Deborah Swanson wrote:
> [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')
Lovely column names ;)
> Because, I can't say
>
> r = r._replace(getattr(r, column) = data)
When r is mutable, i. e. *not* a namedtuple, you can write
setattr(r, column, data)
This assumes column is the column