#25093: utils.datastructures.OrderedSet doesn't implement __len__ -----------------------------+-------------------- Reporter: kezabelle | Owner: nobody Type: New feature | Status: new Component: Utilities | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------+-------------------- {{{ >>> x = set([1, 2]) >>> len(x) 2 >>> from django.utils.datastructures import OrderedSet >>> y = OrderedSet([1, 2]) >>> len(y) TypeError: object of type 'OrderedSet' has no len() }}} Given the implementation of `__iter__`, it seems like it would be plausible to re-use that: {{{ >>> len([z for z in y]) 2 }}}
-- Ticket URL: <https://code.djangoproject.com/ticket/25093> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.a64906bf504e09dd5c0b31415a19161d%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.