Re:What’s New In Python 3.6
by lgunsch on Wednesday December 07, 2016 @12:20PM
(#13124214)
I gives a name and expected properties to common data structures, or unspoken unnamed types.
Many times when a dict is used, it's expected to have certain attributes, and may have expected ways of interacting with those attributes. Named tuples is a simple way to formalize these, which makes them not so mysterious to you future-you, or to other developers who inherit the project 6 months down the road.
Many times when a dict is used, it's expected to have certain attributes, and may have expected ways of interacting with those attributes. Named tuples is a simple way to formalize these, which makes them not so mysterious to you future-you, or to other developers who inherit the project 6 months down the road.