print is a function with Python 3

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Trivial - P5
    • 2.9, 3.1
    • Affects Version/s: None
    • Component/s: Docs
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 Hackett
            Reporter:
            Sébastien Celles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: