[New-bugs-announce] [issue41379] Configparser is not reading Indended Sections as Mentioned in Docs
Vignesh Rajendran
report at bugs.python.org
Fri Jul 24 02:01:23 EDT 2020
New submission from Vignesh Rajendran <vickygum95 at gmail.com>:
https://github.com/jaraco/configparser/issues/55
Please check the Bug is raised also in Github,
Sections can be intended is specified in the documentation.
When I read the indented section, its throwing section not found an error in python 3.8
as per Documentation https://docs.python.org/3/library/configparser.html
[You can use comments]
like this
; or this
[Sections Can Be Indented]
can_values_be_as_well = True
does_that_mean_anything_special = False
purpose = formatting for readability
but this is not working.
check this https://stackoverflow.com/questions/62833787/how-to-read-indentated-sections-with-python-configparser/62836972?noredirect=1#comment111176192_62836972
if i read an indented section, its showing section not found.
my file:
[section]
a = 0.3
[subsection]
b = 123
import configparser
conf = configparser.ConfigParser()
conf.read("./test.conf")
a = conf['section']['a']
print(a)
Output of a:
0.3
[subsection]
b = 123
Expected a : 0.3 only
But Section b is not found
----------
messages: 374160
nosy: Vignesh Rajendran
priority: normal
severity: normal
status: open
title: Configparser is not reading Indended Sections as Mentioned in Docs
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41379>
_______________________________________
More information about the New-bugs-announce
mailing list