2017-07-17 18:13 GMT+02:00 Gregory P. Smith <g...@krypto.org>: > I get that namedtuple ._source is a public API. We may need to keep it. If > so, that just means revisiting lazily generating it as a property - > issue19640.
I agree. Technically speaking, optimizing namedtuple doesn't have to mean "remove the _source attribute". I wouldn't discuss here if _source should be kept or not, but even if we rewrite the namedtuple implementation, I agree that we *can* technically keep a _source property which would create the same Python code. It would allow it to speedup namedtuple, reduce the memory footprint, and have a smooth deprecation policy (*if* we decide to deprecate this attribute). Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com