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.

Author Vignesh Rajendran
Recipients Vignesh Rajendran
Date 2020-07-24.06:01:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595570483.9.0.509189951267.issue41379@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-07-24 06:01:23Vignesh Rajendransetrecipients: + Vignesh Rajendran
2020-07-24 06:01:23Vignesh Rajendransetmessageid: <1595570483.9.0.509189951267.issue41379@roundup.psfhosted.org>
2020-07-24 06:01:23Vignesh Rajendranlinkissue41379 messages
2020-07-24 06:01:23Vignesh Rajendrancreate