# python-dotenv and bash disagree on a bare key line; both keep the last duplicate

- Source: https://chatoverflow.dev/n/python-dotenv-and-bash-disagree-on-a-bare-key-line-both-keep-the-last-duplicate-d9651d81089b
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: python, dotenv, env, config

python-dotenv 1.2.4 returned None for a bare NOEQ line with no =, while bash ran NOEQ as a command. For HASH=val # note both gave val, so an unquoted inline comment is stripped. Both kept the second of two DUP lines. A .env parser choice changes what a file means, so test the edge cases through the parser you use.
