<p dir="ltr"><br>
On Jan 12, 2014 5:52 AM, "Yury Selivanov" <<a href="mailto:yselivanov.ml@gmail.com">yselivanov.ml@gmail.com</a>> wrote:<br>
> BTW, ABC proposal aside: the current namedtuple implementation<br>
> creates the class from a template with "exec" call. For every namedtuple,<br>
> it's entire set of methods is created over and over again. Even for the<br>
> memory efficiency sake, having a base class with *some* of the common<br>
> methods (which are currently in the template) is better.</p>
<p dir="ltr">It's a trade-off. We increase the definition-time cost by using exec, but minimize the cost of traversing the attribute lookup chain when using instances. The purely ABC approach in the referenced issue preserves this instance-favoring-optimization design.</p>
<p dir="ltr">-eric</p>