{
  "id": "programming.functions.multiple-return-values",
  "uri": "https://open-misconceptions.github.io/miscon-data/m/programming.functions.multiple-return-values",
  "uuid": "ba72c8c8-9a30-4f6a-9c9f-50370cde1a2f",
  "version": "0.1.1",
  "status": "draft",
  "trust": "low",
  "title": "A function can return several separate values",
  "statement": "return a, b sends back two separate values, so the caller receives two things rather than one tuple.",
  "kind": "undergeneralization",
  "domain": "programming.functions",
  "about": [
    {
      "scheme": "Miscon",
      "uri": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.single-return-value"
    }
  ],
  "level_band": [
    "undergraduate"
  ],
  "locale": "en",
  "evidence_patterns": [
    {
      "item_shape": "predict the type of a call that returns a comma-separated list",
      "signature": "predicts two values, or that the second is lost, rather than one tuple",
      "example": {
        "item": "def f():\n    return 1, 2\nx = f()\nprint(type(x))",
        "expected": "<class 'tuple'>",
        "response": "int (or 'error, two values into one variable')"
      }
    }
  ],
  "discriminators": {
    "vs_slip": "Consistent across items and revealed by asking what x holds after x = f(). A slip is a single wrong type."
  },
  "relations": {
    "conflicts_with": [
      {
        "external": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.single-return-value",
        "label": "A function returns one value; several values travel as one tuple"
      }
    ],
    "resolved_by": [
      {
        "external": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.single-return-value",
        "label": "A function returns one value; several values travel as one tuple"
      },
      {
        "external": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.return",
        "label": "return hands a value back to the caller and ends the call"
      }
    ]
  },
  "alignments": [
    {
      "scheme": "progmiscon",
      "code": "Python/MultipleValuesReturn",
      "uri": "https://progmiscon.org/misconceptions/Python/MultipleValuesReturn",
      "relation": "close-match"
    }
  ],
  "provenance": {
    "sources": [
      {
        "type": "inventory",
        "citation": "Chiodini, L., Moreno Santos, I., Gallidabino, A., Tafliovich, A., Santos, A. L., & Hauswirth, M. (2021). A curated inventory of programming language misconceptions. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE '21), 380-386.",
        "doi": "10.1145/3430665.3456343",
        "url": "https://progmiscon.org/",
        "note": "Inventory consulted for the misconception name and scope only; progmiscon publishes no licence for its text, so Open Misconceptions' statements and examples are written independently."
      }
    ],
    "origin": "llm-drafted",
    "notes": "Drafted from the cited literature for the Open Misconceptions seed pack; statement, examples and discriminators are original text. Awaiting maintainer review."
  },
  "history": {
    "changelog": [
      {
        "version": "0.1.1",
        "date": "2026-09-05",
        "change": "Schema 0.2 migration: about/alignments carry a free-string scheme (corestandards.org URLs relabelled CCSS where present); trust computed from reviews[] (none yet, so low); no change to the statement or evidence."
      }
    ]
  },
  "license": "CC-BY-4.0"
}
