cpython icon indicating copy to clipboard operation
cpython copied to clipboard

[configparser] Add section/option delimiter to ExtendedInterpolation

Open 0ea196a8-978c-46c5-9324-823edd12aae9 opened this issue 10 years ago • 1 comments

BPO 24131
Nosy @ambv

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2015-05-06.02:16:28.022>
labels = ['type-feature', 'library']
title = '[configparser] Add section/option delimiter to ExtendedInterpolation'
updated_at = <Date 2015-05-06.02:17:32.032>
user = 'https://bugs.python.org/giflw'

bugs.python.org fields:

activity = <Date 2015-05-06.02:17:32.032>
actor = 'ned.deily'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2015-05-06.02:16:28.022>
creator = 'giflw'
dependencies = []
files = []
hgrepos = []
issue_num = 24131
keywords = []
message_count = 1.0
messages = ['242638']
nosy_count = 2.0
nosy_names = ['lukasz.langa', 'giflw']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue24131'
versions = ['Python 3.5', 'Python 3.6']

Using configparser.ExtendedInterpolation one can interpolate ${section:option}. It would be nice to have a parameter on ExtendedInterpolation __init__ to change the delimiter, thus one can use ${section/option} instead (using '/' instead of ':', for example).

Hello, I would like to work on this issue and would appreciate some guidance. Can we simply override the __init__ of the base class in ExtendedInterpolation and add a new self.delimiter that the user passes?

obi-wan-shinobi avatar Feb 05 '23 16:02 obi-wan-shinobi

Hi, you can follow the contributor's manual at https://devguide.python.org/.

arhadthedev avatar Feb 05 '23 16:02 arhadthedev