On this page
  1. configparser.InterpolationSyntaxError
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

configparser.InterpolationSyntaxError

Prev: configparser.InterpolationMissingOptionError | Up: configparser | Next: configparser.InvalidWriteError
Rel: configparser.BasicInterpolation, configparser.ConfigParser, configparser.ConverterMapping, configparser.DuplicateOptionError
Ref: docs.python.org โ€” configparser.InterpolationSyntaxError
Tags: #public #python3 #stdlib #configparser


Import

import configparser
from configparser import InterpolationSyntaxError

Signature & Overview

configparser.InterpolationSyntaxError(option, section, msg)

Raised when the source text contains invalid syntax.

Methods & Attributes

Usage

import configparser

cp = configparser.ConfigParser()
cp.read_string("[s]\nrate = 100%\n")
try:
    _ = cp["s"]["rate"]
except configparser.InterpolationSyntaxError:
    assert True

Gotchas

REPL Inspect

from configparser import InterpolationSyntaxError
help(InterpolationSyntaxError)

Linked from

Related notes