News for hackers. Stuff that matters.
Re:Exposing Python 3.6's Private Dict Version by maxerickson on Wednesday May 31, 2017 @09:47PM (#14457367)
Adding a member to the tuple requires updating all code that unpacks it.

Adding an attribute doesn't impact any code that doesn't use the attribute.

Re:Exposing Python 3.6's Private Dict Version by m_mueller on Wednesday May 31, 2017 @10:10PM (#14457439)
Yes, that's why you usually don't use unpacking for a namedtuple. This works just fine without me adding additional 3rd party packages:

> from collections import namedtuple

> Point = namedtuple('Point', ['x', 'y'])

> points = [Point(3,4), Point(5,2)]

> for p in points:

> print(p.x, p.y)