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

Docs for pymongo.collection.Collection.insert() state that it accepts "any iterable"

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.7.2, 3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      All

      The documentation for collection.insert() states that "Bulk insert works with any iterable" when in fact this isn't true.

      For example insert("a string") fails with:

      TypeError: 'str' object does not support item assignment

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            jamiebullock Jamie Bullock
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: