New submission from Vignesh Rajendran <vickygu...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue41379>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to