Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-281

Add __len__ support for Python Collection interface

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.1
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Python has native mechanism to determine length of any utterable collection with len() function. PyMongo uses own non-standard method collection.count(). It would be great if PyMongo will support native python method len() to make driver more developer-friendly.

      Moreover as soon as you already have count() method, you can add it as easy as 1 line of code

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            alexey Alexey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: