George Shuklin
Jul 28, 2017 · 1 min read

With all due respect, I don’t think that named tuples in Python any close to be used in real life.

They are write once, and their declaration is horrible. Use space inside string to separate names? I may tolerate this in pytest decorators (as pytest is just a library and have no magical powers), but inside of declaration of data structure? No, it’s too ugly.

There is a recordtype recipe, but it’s at the same level of ugliness.

Structures should be language feature, or language should be agile enough to allow their construction without falling to ‘we will parse strings with variable names at runtime’.

    George Shuklin

    Written by

    I work at Servers.com, most of my stories are about Ansible, Ceph, Python, Openstack and Linux.