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

method Cursor.clone() returns a new Cursor instance with references on parent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      None

      Description

      method clone() returns a new Cursor instance with references on parent Cursor.

      simple example

      c=db.list.find({})
      print c.Cursor_spec
      c2=c.clone()
      c2.Cursor_spec['_id']=1
      print c.Cursor_spec
      print c2.Cursor_spec

      I get output
      {}

      {'_id': 1} {'_id': 1}

      probably better to do a copy all arguments so that can change the clone without consequences.

        Attachments

          Activity

            People

            Assignee:
            ross.lawley Ross Lawley
            Reporter:
            uchti Denis
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: