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

print is a function with Python 3

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.9, 3.1
    • Affects Version/s: None
    • Component/s: Docs
    • None

      Hello,

      just a minor docs improvement

      in https://github.com/mongodb/mongo-python-driver/blob/master/README.rst

      print might changed to work both with Python 2.7 and Python 3.x

      >>> for item in db.my_collection.find():
      ... print(item["x"])
      ...
      10
      8
      11
      >>> db.my_collection.create_index("x")
      u'x_1'
      >>> for item in db.my_collection.find().sort("x", pymongo.ASCENDING):
      ... print(item["x"])

      Kind regards

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            scls Sébastien Celles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: