bpo-32492: Tweak _collections._tuplegetter. by serhiy-storchaka · Pull Request #11367 · python/cpython (original) (raw)

If caching is taken out, then docstring interning should be added back.

Python 3.8.0a0 (heads/pr_11367:906c21fb8b, Dec 30 2018, 14:49:20)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import namedtuple
>>> P = namedtuple('P', ['m', 'n'])
>>> Q = namedtuple('Q', ['o', 'p'])
>>> P.m.__doc__ is Q.o.__doc__
False
>>> P.m.__doc__ == Q.o.__doc__
True