News for hackers. Stuff that matters.
Re:Redesigning Python's named tuples by hyperbovine on Friday September 01, 2017 @08:21AM (#15147728)
Agreed, I use the fact that "namedtuples are tuples" constantly. For one thing, you can pass them to 3rd party libraries that take tuples while maintaining readability on your end. I would be horrified if they dropped index access. It would break everything.

I should say though, for simple POJO-style classes @attr.s (https://github.com/python-attrs/attrs) has replaced 90% of my namedtuple usage.

There are no comments on this comment yet.