Users of namedtuple: do you use the _source attribute?
Ben Finney
ben+python at benfinney.id.au
Mon Jul 17 16:12:48 EDT 2017
Steve D'Aprano <steve+python at pearwood.info> writes:
> collections.namedtuple generates a new class using exec, and records
> the source code for the class as a _source attribute.
The documentation tells me that ‘_source’ is “New in version 3.3.”
I wasn't aware that the ‘namedtuple’ interface had changed since it was
introduced, so:
> Is there anyone here who uses the namedtuple _source attribute?
Not me.
--
\ “Anyone who believes exponential growth can go on forever in a |
`\ finite world is either a madman or an economist.” —Kenneth |
_o__) Boulding, 1973 |
Ben Finney
More information about the Python-list
mailing list