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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial - P5
    • Resolution: Fixed
    • None
    • 2.7.2, 3.0
    • None
    • All

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: