This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lazka
Recipients JelleZijlstra, eric.smith, giampaolo.rodola, gvanrossum, lazka, methane, ncoghlan, pitrou, rhettinger, serhiy.storchaka, vstinner, xiang.zhang
Date 2017-07-18.10:53:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Why not just do the following:

>>> from collections import namedtuple
>>> Point = namedtuple('Point', ['x', 'y'])
>>> Point._source
"from collections import namedtuple\nPoint = namedtuple('Point', ['x', 'y'])\n"

The docs make it seems as if the primary use case of the _source attribute is
to serialize the definition. Returning a source which produces a class with
different performance/memory characteristics goes against that.
Date User Action Args
2017-07-18 10:53:41lazkasetrecipients: + lazka, gvanrossum, rhettinger, ncoghlan, pitrou, vstinner, eric.smith, giampaolo.rodola, methane, serhiy.storchaka, xiang.zhang, JelleZijlstra
2017-07-18 10:53:41lazkasetmessageid: <>
2017-07-18 10:53:41lazkalinkissue28638 messages
2017-07-18 10:53:41lazkacreate