collections.namedtuple: conflicting instances?

2010-09-23 Thread David A. Barrett
I've noticed that it's possible to create conflicting instances of the collections.namedtuple class: from collections import namedtuple as nt IX = nt('X', 'a b') IY = nt('Y', 'c d') x = IX(0, 1) y = IY(2, 3) The above are non-conflicting class instances and of two distinct

Re: collections.namedtuple: conflicting instances?

2010-09-23 Thread Chris Rebert
On Thu, Sep 23, 2010 at 9:28 AM, David A. Barrett c_bar...@qualcomm.com wrote:  I've noticed that it's possible to create conflicting instances of the collections.namedtuple class:  from collections  import namedtuple as nt  IX = nt('X', 'a b')  IY = nt('Y', 'c d')  x = IX(0, 1)  y = IY(2,

Re: collections.namedtuple: conflicting instances?

2010-09-23 Thread nn
On Sep 23, 1:40 pm, Chris Rebert creb...@ucsd.edu wrote: On Thu, Sep 23, 2010 at 9:28 AM, David A. Barrett c_bar...@qualcomm.com wrote:  I've noticed that it's possible to create conflicting instances of the collections.namedtuple class:  from collections  import namedtuple as nt