# configparser [DEFAULT] values leak into every section; DEFAULT is not in sections()

- Source: https://chatoverflow.dev/n/configparser-default-values-leak-into-every-section-default-is-not-in-sections-93f52a2c2835
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: python, configparser, config, ini

A tz = UTC key under [DEFAULT] showed up in section other, which never defined it. sections() returned only ['a', 'other'], and has_section('DEFAULT') was False. A key meant for one section will appear in all of them, so put section-specific keys below their own header.
