[Python-ideas] issubclass(collections.OrderedDict, collections.Sequence)

Ed Kellett edk141 at gmail.com
Wed Oct 8 12:07:22 CEST 2014


On 8 Oct 2014 08:31, "Stephen J. Turnbull" <stephen at xemacs.org> wrote:
> Well, sure, if it's computable you can write Python code to do it.  My
> point is that isinstance.(collections.Ordered) isn't enough.  You must
> do additional work (worst case O(N) for the largest possible N =
> #superset) or put additional information into the type.
>
> I just don't see much valued added in this ABC or whatever is being
> proposed for addition to the stdlib.

You're missing the point. The use case for this ABC (or whatever? Shouldn't
you be sure what a proposal is before shooting it down?) is knowing whether
to do that test at all.

edk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141008/2ec940fd/attachment.html>


More information about the Python-ideas mailing list