This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: configparser BasicInterpolation issue with %()
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: r.david.murray, timonti
Priority: normal Keywords:

Created on 2016-05-15 15:00 by timonti, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bg.py timonti, 2016-05-15 15:00 Source Code for reading INI file
Messages (2)
msg265617 - (view) Author: Mehrzad Irani (timonti) * Date: 2016-05-15 15:00
The below code works fine with ExtendedInterpolation; however with BasicInterpolation it _url fails with invalid variable reference.

The INI file:
[DEFAULT]
domain=abc.labs.com

[machine-details]
compilation_machine=abc1
compilation_machine_url=%(compilation_machine).%(domain)
compilation_machine_url2=${compilation_machine}.${domain}

Python Version:
Python 3.5.1

Environment:
Arch Linux
msg265623 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-05-15 15:45
You are missing the trailing 's' on the format string.
History
Date User Action Args
2022-04-11 14:58:31adminsetgithub: 71215
2016-05-15 15:45:49r.david.murraysetstatus: open -> closed

type: compile error -> behavior
title: BasicInterpolation issue with %() -> configparser BasicInterpolation issue with %()
nosy: + r.david.murray

messages: + msg265623
resolution: not a bug
stage: resolved
2016-05-15 15:00:49timonticreate