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 pwaller
Recipients amaury.forgeotdarc, eric.araujo, pitrou, pwaller, rhettinger, thead
Date 2010-01-28.00:01:52
SpamBayes Score 3.180789e-13
Marked as misclassified No
Message-id <1264636915.16.0.936588292957.issue7796@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Amaury,

Thanks. I had heard of but never bothered to read about duck-typing before now; though I have used it passively before. I think it does make sense in this case. I can't imagine any case where checking for the _fields attribute would fail and isinstance(x, namedtuple) would not.

Besides which, for my current project I am forced to implement such a "workaround" anyway, so it doesn't affect me as such.

The only reason that remains why I would want it is that I often use isinstance(x, Y) to deal with different Ys, and that was the thing I intuitively wanted to use in this case as a python programmer for quite a few years now. This is probably a pretty weak reason, so I am happy to close this issue if the consensus points to duck typing.
History
Date User Action Args
2010-01-28 00:01:55pwallersetrecipients: + pwaller, rhettinger, amaury.forgeotdarc, pitrou, thead, eric.araujo
2010-01-28 00:01:55pwallersetmessageid: <1264636915.16.0.936588292957.issue7796@psf.upfronthosting.co.za>
2010-01-28 00:01:53pwallerlinkissue7796 messages
2010-01-28 00:01:52pwallercreate