AAmit’s LibraryLEARN · PRACTISE · REFLECT

Computers · Programming Atlas

INI: ConfigParser Dialect Introduction

Sections, string values, explicit conversion, defaults, literal percent/comment text, key and section casing, bounded application checks and semantic round trips. This is one parser dialect, not a universal INI specification or Windows Registry format.

Audience: Learners who can read a short script and save plain text.

Practice: 60 to 90 minutes.

Website reference edition

This introductory material is available here for reading and practice planning. New offline workbench exports, PDF and ZIP editions for these additions are not published. The released Atlas 0.11 downloads cover the earlier 19 packs only. These pages do not run teaching code or contact an AI service.

Runtime and boundaries

The .ini file is the configuration example; its fixed Check.py companion reads only that matching authored file using UTF-8, then exercises tiny in-memory cases. Run /usr/bin/python3 -I -B with the exact companion filename. Python is the driver, not a second new catalogue entry. Installed Python 3.9.6 is unsupported upstream; the 3.9 documentation now describes 3.9.25, so recorded tests rather than exact-patch documentation establish behavior here. No runtime upgrade is performed. ConfigParser uses interpolation=None and strict=True. Parsing does not validate an application schema or make arbitrary configuration safe. No shell, environment expansion, network, credentials or execution of parsed values is used.

Introductory module · 2 exercises

The unchanged /usr/bin/python3 launcher emitted a recorded confstr temporary-directory discovery warning and reported fallback to /tmp. Teaching exit status and exact stdout matched. Raw stderr is preserved; no suppression, alternative launcher, environment, permission or security change was made. The cause of the startup warning is not diagnosed.

Lessons

A configuration format needs a parser contract

These examples choose Python ConfigParser, strict duplicate handling and disabled interpolation. Keep those choices beside a file. A different application may give similar-looking INI text different meaning. The format is data, not a general-purpose programming language.

Parse strings, then convert deliberately

The first example prints both the stored string and the explicitly converted integer and boolean. A failed conversion is distinct from malformed INI syntax. Even a converted integer still needs an application range check.

Defaults are part of effective values

Predict a section value, an inherited DEFAULT value and a fallback when neither exists. The defaults exercise makes precedence visible. Record whether an application accepts inherited keys before imposing a closed configuration shape.

Literal text and casing can surprise a reader

With interpolation disabled, percent placeholders stay literal. Inline comment parsing is disabled by the chosen defaults, so a trailing # note remains in the value. The casing example separates normalized option names from case-sensitive section names.

Validate purpose and preserve meaning

The study-contract exercise checks allowed keys, integer range and boolean spelling after parsing. The round-trip exercise writes to an in-memory string and reparses it: effective values can survive while comments and formatting do not. The installed Python branch is unsupported; these are bounded learning fixtures only.

Reference cards

Section: [study]

Group options under a named section.

Value: minutes = 20

Values begin as text; conversion is explicit.

Typed access: getint / getboolean

Convert using the selected parser rules, then apply application limits.

Defaults: [DEFAULT] / fallback=

Inherited defaults take precedence over a fallback argument.

Literal policy: interpolation=None

Keep percent placeholders as text.

Duplicates: strict=True

Reject duplicates within one parsed source; not a claim about multi-source layering.

Casing: optionxform / section names

Default option names normalize to lowercase; sections retain case sensitivity.

Round trip: write(StringIO) / read_string

Compare semantic values; comments and original layout are not preserved.

Support file: INI ConfigParser Dialect Introduction instructions.txt
Content-only candidate. Use only the fixed authored examples with their listed installed runtime.
The .ini file is the configuration example; its fixed Check.py companion reads only that matching authored file using UTF-8, then exercises tiny in-memory cases. Run /usr/bin/python3 -I -B with the exact companion filename. Python is the driver, not a second new catalogue entry. Installed Python 3.9.6 is unsupported upstream; the 3.9 documentation now describes 3.9.25, so recorded tests rather than exact-patch documentation establish behavior here. No runtime upgrade is performed. ConfigParser uses interpolation=None and strict=True. Parsing does not validate an application schema or make arbitrary configuration safe. No shell, environment expansion, network, credentials or execution of parsed values is used.
No browser/export/release acceptance is claimed.

Examples and practice

All code and values below are inert reading material. Preserve each exact filename and companion when making your own practice copy.

INI 01 - Convert explicit types

Parser success creates strings. The caller converts both fields; invalid numeric or boolean text is an expected conversion rejection inside this successful driver.

Filename: INI 01 Convert explicit types.ini

[study]
minutes = 20
enabled = yes

Expected output:

ordinary: ["20",20,true]
false is not truthy text: ["0",0,false]
bad integer: "conversion rejected"
bad boolean: "conversion rejected"

Recorded invocation:

/usr/bin/python3 -I -B "INI 01 Convert explicit types Check.py"

Driver filename: INI 01 Convert explicit types Check.py

Companion: INI 01 Convert explicit types Check.py

import configparser
import io
import json
from pathlib import Path

def inspect(text):
    cfg = configparser.ConfigParser(interpolation=None, strict=True)
    cfg.read_string(text)
    try:
        return [cfg.get("study", "minutes"), cfg.getint("study", "minutes"), cfg.getboolean("study", "enabled")]
    except ValueError:
        return "conversion rejected"

cases = json.loads('[{"name": "ordinary", "input": "[study]\\nminutes = 20\\nenabled = yes\\n", "expected": ["20", 20, true]}, {"name": "false is not truthy text", "input": "[study]\\nminutes = 0\\nenabled = false\\n", "expected": ["0", 0, false]}, {"name": "bad integer", "input": "[study]\\nminutes = twenty\\nenabled = yes\\n", "expected": "conversion rejected"}, {"name": "bad boolean", "input": "[study]\\nminutes = 20\\nenabled = maybe\\n", "expected": "conversion rejected"}]')
cases[0]["input"] = Path(__file__).with_name('INI 01 Convert explicit types.ini').read_text(encoding="utf-8")
for item in cases:
    if len(item["input"]) > 4096:
        raise ValueError("Fixture too large")
    actual = inspect(item["input"])
    if actual != item["expected"]:
        raise AssertionError("Unexpected result: " + item["name"])
    print(item["name"] + ": " + json.dumps(actual, ensure_ascii=False, separators=(",", ":")))

Typed result contract

variant
host-driver
summary
ordinary: ["20",20,true]
false is not truthy text: ["0",0,false]
bad integer: "conversion rejected"
bad boolean: "conversion rejected"
stdout

Type: string

"ordinary: [\"20\",20,true]\nfalse is not truthy text: [\"0\",0,false]\nbad integer: \"conversion rejected\"\nbad boolean: \"conversion rejected\"\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value

Authored case table

variant
hosted-cases
rows
  1. name
    ordinary
    input

    Type: string

    "[study]\nminutes = 20\nenabled = yes\n"
    expected value

    Type: array

    [
      "20",
      20,
      true
    ]
  2. name
    false is not truthy text
    input

    Type: string

    "[study]\nminutes = 0\nenabled = false\n"
    expected value

    Type: array

    [
      "0",
      0,
      false
    ]
  3. name
    bad integer
    input

    Type: string

    "[study]\nminutes = twenty\nenabled = yes\n"
    expected value

    Type: string

    "conversion rejected"
  4. name
    bad boolean
    input

    Type: string

    "[study]\nminutes = 20\nenabled = maybe\n"
    expected value

    Type: string

    "conversion rejected"
INI 02 - Resolve defaults

The fallback does not override an inherited DEFAULT option. All results here remain strings.

Filename: INI 02 Resolve defaults.ini

[DEFAULT]
minutes = 20
[study]

Expected output:

inherited default: "20"
section override: "30"
fallback only: "5"

Recorded invocation:

/usr/bin/python3 -I -B "INI 02 Resolve defaults Check.py"

Driver filename: INI 02 Resolve defaults Check.py

Companion: INI 02 Resolve defaults Check.py

import configparser
import io
import json
from pathlib import Path

def inspect(text):
    cfg = configparser.ConfigParser(interpolation=None, strict=True)
    cfg.read_string(text)
    return cfg.get("study", "minutes", fallback="5")

cases = json.loads('[{"name": "inherited default", "input": "[DEFAULT]\\nminutes = 20\\n[study]\\n", "expected": "20"}, {"name": "section override", "input": "[DEFAULT]\\nminutes = 20\\n[study]\\nminutes = 30\\n", "expected": "30"}, {"name": "fallback only", "input": "[study]\\n", "expected": "5"}]')
cases[0]["input"] = Path(__file__).with_name('INI 02 Resolve defaults.ini').read_text(encoding="utf-8")
for item in cases:
    if len(item["input"]) > 4096:
        raise ValueError("Fixture too large")
    actual = inspect(item["input"])
    if actual != item["expected"]:
        raise AssertionError("Unexpected result: " + item["name"])
    print(item["name"] + ": " + json.dumps(actual, ensure_ascii=False, separators=(",", ":")))

Typed result contract

variant
host-driver
summary
inherited default: "20"
section override: "30"
fallback only: "5"
stdout

Type: string

"inherited default: \"20\"\nsection override: \"30\"\nfallback only: \"5\"\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value

Authored case table

variant
hosted-cases
rows
  1. name
    inherited default
    input

    Type: string

    "[DEFAULT]\nminutes = 20\n[study]\n"
    expected value

    Type: string

    "20"
  2. name
    section override
    input

    Type: string

    "[DEFAULT]\nminutes = 20\n[study]\nminutes = 30\n"
    expected value

    Type: string

    "30"
  3. name
    fallback only
    input

    Type: string

    "[study]\n"
    expected value

    Type: string

    "5"
INI 03 - Preserve literal text

No interpolation or environment expansion occurs. These are literal text contracts; enabling inline comments or interpolation would change their meaning.

Filename: INI 03 Preserve literal text.ini

[study]
message = done 50% %(name)s ${TOKEN}

Expected output:

percent literal: "done 50% %(name)s ${TOKEN}"
inline hash is data: "read # note"
inline semicolon is data: "read ; note"

Recorded invocation:

/usr/bin/python3 -I -B "INI 03 Preserve literal text Check.py"

Driver filename: INI 03 Preserve literal text Check.py

Companion: INI 03 Preserve literal text Check.py

import configparser
import io
import json
from pathlib import Path

def inspect(text):
    cfg = configparser.ConfigParser(interpolation=None, strict=True)
    cfg.read_string(text)
    return cfg.get("study", "message")

cases = json.loads('[{"name": "percent literal", "input": "[study]\\nmessage = done 50% %(name)s ${TOKEN}\\n", "expected": "done 50% %(name)s ${TOKEN}"}, {"name": "inline hash is data", "input": "[study]\\nmessage = read # note\\n", "expected": "read # note"}, {"name": "inline semicolon is data", "input": "[study]\\nmessage = read ; note\\n", "expected": "read ; note"}]')
cases[0]["input"] = Path(__file__).with_name('INI 03 Preserve literal text.ini').read_text(encoding="utf-8")
for item in cases:
    if len(item["input"]) > 4096:
        raise ValueError("Fixture too large")
    actual = inspect(item["input"])
    if actual != item["expected"]:
        raise AssertionError("Unexpected result: " + item["name"])
    print(item["name"] + ": " + json.dumps(actual, ensure_ascii=False, separators=(",", ":")))

Typed result contract

variant
host-driver
summary
percent literal: "done 50% %(name)s ${TOKEN}"
inline hash is data: "read # note"
inline semicolon is data: "read ; note"
stdout

Type: string

"percent literal: \"done 50% %(name)s ${TOKEN}\"\ninline hash is data: \"read # note\"\ninline semicolon is data: \"read ; note\"\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value

Authored case table

variant
hosted-cases
rows
  1. name
    percent literal
    input

    Type: string

    "[study]\nmessage = done 50% %(name)s ${TOKEN}\n"
    expected value

    Type: string

    "done 50% %(name)s ${TOKEN}"
  2. name
    inline hash is data
    input

    Type: string

    "[study]\nmessage = read # note\n"
    expected value

    Type: string

    "read # note"
  3. name
    inline semicolon is data
    input

    Type: string

    "[study]\nmessage = read ; note\n"
    expected value

    Type: string

    "read ; note"
INI 04 - Separate key and section case

The default option transformation lowercases keys, while the two section spellings remain different names. Duplicate normalized options are rejected in a separate parser fixture.

Filename: INI 04 Separate key and section case.ini

[Study]
Minutes = 20
ENABLED = yes

Expected output:

capitalized section: [["Study"],false,true,["enabled","minutes"]]
lowercase section: [["study"],true,false,["minutes"]]
another option spelling: [["study"],true,false,["minutes"]]

Recorded invocation:

/usr/bin/python3 -I -B "INI 04 Separate key and section case Check.py"

Driver filename: INI 04 Separate key and section case Check.py

Companion: INI 04 Separate key and section case Check.py

import configparser
import io
import json
from pathlib import Path

def inspect(text):
    cfg = configparser.ConfigParser(interpolation=None, strict=True)
    cfg.read_string(text)
    return [cfg.sections(), cfg.has_section("study"), cfg.has_section("Study"), sorted(cfg[cfg.sections()[0]].keys())]

cases = json.loads('[{"name": "capitalized section", "input": "[Study]\\nMinutes = 20\\nENABLED = yes\\n", "expected": [["Study"], false, true, ["enabled", "minutes"]]}, {"name": "lowercase section", "input": "[study]\\nMinutes = 20\\n", "expected": [["study"], true, false, ["minutes"]]}, {"name": "another option spelling", "input": "[study]\\nMiNuTeS = 20\\n", "expected": [["study"], true, false, ["minutes"]]}]')
cases[0]["input"] = Path(__file__).with_name('INI 04 Separate key and section case.ini').read_text(encoding="utf-8")
for item in cases:
    if len(item["input"]) > 4096:
        raise ValueError("Fixture too large")
    actual = inspect(item["input"])
    if actual != item["expected"]:
        raise AssertionError("Unexpected result: " + item["name"])
    print(item["name"] + ": " + json.dumps(actual, ensure_ascii=False, separators=(",", ":")))

Typed result contract

variant
host-driver
summary
capitalized section: [["Study"],false,true,["enabled","minutes"]]
lowercase section: [["study"],true,false,["minutes"]]
another option spelling: [["study"],true,false,["minutes"]]
stdout

Type: string

"capitalized section: [[\"Study\"],false,true,[\"enabled\",\"minutes\"]]\nlowercase section: [[\"study\"],true,false,[\"minutes\"]]\nanother option spelling: [[\"study\"],true,false,[\"minutes\"]]\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value

Authored case table

variant
hosted-cases
rows
  1. name
    capitalized section
    input

    Type: string

    "[Study]\nMinutes = 20\nENABLED = yes\n"
    expected value

    Type: array

    [
      [
        "Study"
      ],
      false,
      true,
      [
        "enabled",
        "minutes"
      ]
    ]
  2. name
    lowercase section
    input

    Type: string

    "[study]\nMinutes = 20\n"
    expected value

    Type: array

    [
      [
        "study"
      ],
      true,
      false,
      [
        "minutes"
      ]
    ]
  3. name
    another option spelling
    input

    Type: string

    "[study]\nMiNuTeS = 20\n"
    expected value

    Type: array

    [
      [
        "study"
      ],
      true,
      false,
      [
        "minutes"
      ]
    ]
INI 05 - Validate a study contract

Solution: this application permits exactly one section and two options, with no inherited defaults. Parsing and conversion do not enforce those rules automatically.

Filename: INI 05 Validate a study contract.ini

[study]
minutes = 20
enabled = yes

Expected output:

valid: {"minutes":20,"enabled":true}
upper boundary: {"minutes":120,"enabled":false}
too large: "range rejected"
extra option: "shape rejected"
default forbidden: "shape rejected"

Recorded invocation:

/usr/bin/python3 -I -B "INI 05 Validate a study contract Check.py"

Driver filename: INI 05 Validate a study contract Check.py

Companion: INI 05 Validate a study contract Check.py

import configparser
import io
import json
from pathlib import Path

def inspect(text):
    cfg = configparser.ConfigParser(interpolation=None, strict=True)
    cfg.read_string(text)
    if cfg.defaults() or cfg.sections() != ["study"]:
        return "shape rejected"
    if set(cfg["study"]) != {"minutes", "enabled"}:
        return "shape rejected"
    try:
        minutes = cfg.getint("study", "minutes")
        enabled = cfg.getboolean("study", "enabled")
    except ValueError:
        return "conversion rejected"
    if not 0 <= minutes <= 120:
        return "range rejected"
    return {"minutes": minutes, "enabled": enabled}

cases = json.loads('[{"name": "valid", "input": "[study]\\nminutes = 20\\nenabled = yes\\n", "expected": {"minutes": 20, "enabled": true}}, {"name": "upper boundary", "input": "[study]\\nminutes = 120\\nenabled = off\\n", "expected": {"minutes": 120, "enabled": false}}, {"name": "too large", "input": "[study]\\nminutes = 121\\nenabled = yes\\n", "expected": "range rejected"}, {"name": "extra option", "input": "[study]\\nminutes = 20\\nenabled = yes\\nextra = x\\n", "expected": "shape rejected"}, {"name": "default forbidden", "input": "[DEFAULT]\\nminutes = 20\\n[study]\\nenabled = yes\\n", "expected": "shape rejected"}]')
cases[0]["input"] = Path(__file__).with_name('INI 05 Validate a study contract.ini').read_text(encoding="utf-8")
for item in cases:
    if len(item["input"]) > 4096:
        raise ValueError("Fixture too large")
    actual = inspect(item["input"])
    if actual != item["expected"]:
        raise AssertionError("Unexpected result: " + item["name"])
    print(item["name"] + ": " + json.dumps(actual, ensure_ascii=False, separators=(",", ":")))

Typed result contract

variant
host-driver
summary
valid: {"minutes":20,"enabled":true}
upper boundary: {"minutes":120,"enabled":false}
too large: "range rejected"
extra option: "shape rejected"
default forbidden: "shape rejected"
stdout

Type: string

"valid: {\"minutes\":20,\"enabled\":true}\nupper boundary: {\"minutes\":120,\"enabled\":false}\ntoo large: \"range rejected\"\nextra option: \"shape rejected\"\ndefault forbidden: \"shape rejected\"\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value

Authored case table

variant
hosted-cases
rows
  1. name
    valid
    input

    Type: string

    "[study]\nminutes = 20\nenabled = yes\n"
    expected value

    Type: object

    {
      "minutes": 20,
      "enabled": true
    }
  2. name
    upper boundary
    input

    Type: string

    "[study]\nminutes = 120\nenabled = off\n"
    expected value

    Type: object

    {
      "minutes": 120,
      "enabled": false
    }
  3. name
    too large
    input

    Type: string

    "[study]\nminutes = 121\nenabled = yes\n"
    expected value

    Type: string

    "range rejected"
  4. name
    extra option
    input

    Type: string

    "[study]\nminutes = 20\nenabled = yes\nextra = x\n"
    expected value

    Type: string

    "shape rejected"
  5. name
    default forbidden
    input

    Type: string

    "[DEFAULT]\nminutes = 20\n[study]\nenabled = yes\n"
    expected value

    Type: string

    "shape rejected"

Practice: Design a study configuration with minutes between zero and 120 and a boolean enabled flag. Reject extra options and inherited defaults. Predict each rejected case before reading the solution.

INI 06 - Round trip values

Solution: the effective section values round-trip here, but the original comment and spacing do not. This is not a byte-preserving editor, and it writes only to an in-memory buffer.

Filename: INI 06 Round trip values.ini

[study]
# original note
Minutes=20

Expected output:

comment and spelling: [true,false,{"minutes":"20"}]
literal percent: [true,false,{"message":"50%"}]
empty value: [true,false,{"message":""}]

Recorded invocation:

/usr/bin/python3 -I -B "INI 06 Round trip values Check.py"

Driver filename: INI 06 Round trip values Check.py

Companion: INI 06 Round trip values Check.py

import configparser
import io
import json
from pathlib import Path

def inspect(text):
    cfg = configparser.ConfigParser(interpolation=None, strict=True)
    cfg.read_string(text)
    buffer = io.StringIO()
    cfg.write(buffer)
    rendered = buffer.getvalue()
    again = configparser.ConfigParser(interpolation=None, strict=True)
    again.read_string(rendered)
    return [dict(cfg["study"]) == dict(again["study"]), "# original note" in rendered, dict(again["study"])]

cases = json.loads('[{"name": "comment and spelling", "input": "[study]\\n# original note\\nMinutes=20\\n", "expected": [true, false, {"minutes": "20"}]}, {"name": "literal percent", "input": "[study]\\nmessage = 50%\\n", "expected": [true, false, {"message": "50%"}]}, {"name": "empty value", "input": "[study]\\nmessage =\\n", "expected": [true, false, {"message": ""}]}]')
cases[0]["input"] = Path(__file__).with_name('INI 06 Round trip values.ini').read_text(encoding="utf-8")
for item in cases:
    if len(item["input"]) > 4096:
        raise ValueError("Fixture too large")
    actual = inspect(item["input"])
    if actual != item["expected"]:
        raise AssertionError("Unexpected result: " + item["name"])
    print(item["name"] + ": " + json.dumps(actual, ensure_ascii=False, separators=(",", ":")))

Typed result contract

variant
host-driver
summary
comment and spelling: [true,false,{"minutes":"20"}]
literal percent: [true,false,{"message":"50%"}]
empty value: [true,false,{"message":""}]
stdout

Type: string

"comment and spelling: [true,false,{\"minutes\":\"20\"}]\nliteral percent: [true,false,{\"message\":\"50%\"}]\nempty value: [true,false,{\"message\":\"\"}]\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value

Authored case table

variant
hosted-cases
rows
  1. name
    comment and spelling
    input

    Type: string

    "[study]\n# original note\nMinutes=20\n"
    expected value

    Type: array

    [
      true,
      false,
      {
        "minutes": "20"
      }
    ]
  2. name
    literal percent
    input

    Type: string

    "[study]\nmessage = 50%\n"
    expected value

    Type: array

    [
      true,
      false,
      {
        "message": "50%"
      }
    ]
  3. name
    empty value
    input

    Type: string

    "[study]\nmessage =\n"
    expected value

    Type: array

    [
      true,
      false,
      {
        "message": ""
      }
    ]

Practice: Round-trip the authored configuration without touching disk. Compare values separately from exact text and explain what happened to the comment.

Separate expected outcome: ini-duplicate-option
id
ini-duplicate-option
variant
expected-exception-driver
category
INI parser rejection; no application validation
inputs
code

Type: string

"import configparser\np = configparser.ConfigParser(interpolation=None, strict=True)\ntry:\n    p.read_string('[study]\\nminutes=20\\nMINUTES=30\\n')\nexcept configparser.DuplicateOptionError as error:\n    print(type(error).__name__)\nelse:\n    raise AssertionError(\"Unexpected parser success\")\n"
stdout

Type: string

"DuplicateOptionError\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value
execution meaning
Driver catches and verifies an expected exception; exit 0 is expected driver success, not parser acceptance.
individual download control
false
Separate expected outcome: ini-missing-section
id
ini-missing-section
variant
expected-exception-driver
category
INI parser rejection; no application validation
inputs
code

Type: string

"import configparser\np = configparser.ConfigParser(interpolation=None, strict=True)\ntry:\n    p.read_string('minutes=20\\n')\nexcept configparser.MissingSectionHeaderError as error:\n    print(type(error).__name__)\nelse:\n    raise AssertionError(\"Unexpected parser success\")\n"
stdout

Type: string

"MissingSectionHeaderError\n"
exit status

Type: integer

0
stderr
match
exact-or-recorded-launcher-warning
value
execution meaning
Driver catches and verifies an expected exception; exit 0 is expected driver success, not parser acceptance.
individual download control
false

Prompt templates

Planning text only; no AI service or export control is activated here.

Build an explicit contract
Create a small original example for the stated dialect with input assumptions and exact expected results. Language: {language}. Goal: {goal}. Runtime: {runtime}. Constraints: {constraints}.
Debug the correct stage
Separate syntax or parsing failure from a nonmatch or application validation rejection; ask for the smallest authored reproducer. Language: {language}. Goal: {goal}. Runtime: {runtime}. Constraints: {constraints}.
Test the boundary
Include empty, missing, unusual spelling and boundary cases; label expected rejections separately and do not claim execution without evidence. Language: {language}. Goal: {goal}. Runtime: {runtime}. Constraints: {constraints}.
Preserve accepted inputs
Simplify the fixed pattern or configuration without changing accepted and rejected cases; keep data out of executable syntax. Language: {language}. Goal: {goal}. Runtime: {runtime}. Constraints: {constraints}.
Explain the limits
State dialect, runtime, source date, intended input limits and untested features; this is introductory coverage rather than deep mastery. Language: {language}. Goal: {goal}. Runtime: {runtime}. Constraints: {constraints}.

Historical measure scopes

These measures describe separate, overlapping source-example checks. They are not additive totals or website acceptance results.

  1. name
    teaching_drivers
    count
    6
    unit
    teaching driver executions
    scope
    Historical root module evidence; overlapping measures are not additive.
    tested on
    2026-10-28
    runtime
    CPython 3.9.6 standard-library configparser; macOS 27.0.1 arm64; Python 3.9 is unsupported upstream
  2. name
    embedded_case_assertions
    count
    21
    unit
    embedded case assertions
    scope
    Historical root module evidence; overlapping measures are not additive.
    tested on
    2026-10-28
    runtime
    CPython 3.9.6 standard-library configparser; macOS 27.0.1 arm64; Python 3.9 is unsupported upstream
  3. name
    separate_expected_exception_drivers
    count
    2
    unit
    separate expected exception drivers
    scope
    Historical root module evidence; overlapping measures are not additive.
    tested on
    2026-10-28
    runtime
    CPython 3.9.6 standard-library configparser; macOS 27.0.1 arm64; Python 3.9 is unsupported upstream

Recorded test scope

status
passed with recorded Python startup warnings
tested on
2026-10-28
runtime
CPython 3.9.6 standard-library configparser; macOS 27.0.1 arm64; Python 3.9 is unsupported upstream
teaching drivers
6
embedded case assertions
21
separate expected exception drivers
2
scope
Only fixed authored introductory examples; no browser/export or publication evidence.
runtime warning
The unchanged /usr/bin/python3 launcher emitted a recorded confstr temporary-directory discovery warning and reported fallback to /tmp. Teaching exit status and exact stdout matched. Raw stderr is preserved; no suppression, alternative launcher, environment, permission or security change was made. The cause of the startup warning is not diagnosed.

These are dated source-example results, not website browser, export, PDF or cross-platform acceptance.

Further reading

References are the reviewed source snapshot; they have not been rechecked at website publication time.