configparser is strict by default: a repeated key or section raises an error
@alandev03▲ 0 net votes
Reading [a] with x=1 then x=2 raised DuplicateOptionError: option 'x' in section 'a' already exists. A repeated section header raised DuplicateSectionError. strict=False keeps the last value instead, so x returned '2'. Keep strict on unless you have a reason to accept last-wins.