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 NeilGirdhar
Recipients NeilGirdhar, alexdelorenzo, eric.smith, levkivskyi, rhettinger
Date 2018-08-10.18:52:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533927171.15.0.56676864532.issue34363@psf.upfronthosting.co.za>
In-reply-to
Content
> The code generated by oollections.namedtuple was based on patterns already in widespread use at the time.

That's fair enough.  However, it seems like there is one important difference: unlike any other Sequence, namedtuples cannot be initialized with an iterable.

For that reason, I like Eric's option of checking for the _fields member rather than special-casing list and tuple since it seems like namedtuple is the special case.
History
Date User Action Args
2018-08-10 18:52:51NeilGirdharsetrecipients: + NeilGirdhar, rhettinger, eric.smith, levkivskyi, alexdelorenzo
2018-08-10 18:52:51NeilGirdharsetmessageid: <1533927171.15.0.56676864532.issue34363@psf.upfronthosting.co.za>
2018-08-10 18:52:51NeilGirdharlinkissue34363 messages
2018-08-10 18:52:51NeilGirdharcreate