Redesigning Python's named tuples
It seems like the python maintainers always try to complicate things for themselves to cater for some obscure use case that nobody use. I mean really, when was the last time you ever accessed a namedtuple by index?? (For vectors i do see a benefit that you can throw it right into a matrix multiplication that is designed for arrays but really, you can do that equally easy in other ways). And constructing them on the fly doesn&#x27;t make much sense either as it defats the benefits of a shared type across the code base.<p>All people ever wanted was just a way to write in one line ´Point3D = struct(x, y, z)´ that translates into the <i>exact equivalent</i> of:<p><pre><code>    class Point3D: 
        def __init__(x, y, z):
            self.x = x
            self.y = y
            self.z = z
</code></pre>
What would be the startup performance of parsing the above 5 line class compared to a namedtuple? Surely it should be faster to create it with a shorthand form built into the language, if the functionality is equivalent?