Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

An empty value ignores ${name:-default}

Open Beginner friendly
#715 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@SashaMIT is already working on this.

Since Oct 1, 2026.

  • #716 by @SashaMIT — open
  • #720 by @boriskozak — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

Start by running the Python reproduction in the issue and trace the variable-expansion path for ${name:-default}. Verify the behavior for an empty value, an unset value, a non-empty value, and ${name} without a default; done means the shown cases produce the expected values.

Written by the indexing model from the issue text.

Description

${name:-default} is the POSIX form that uses the default when name is unset or empty. An empty value is returned as itself.

dotenv.dotenv_values(stream=io.StringIO("b=\na=${b:-d}"))
# {'b': '', 'a': ''}

a should be d. A missing b already becomes d. b=c still stays c. ${b} with no default stays empty.

Dominant language
Python
Stars
8.9k
Forks
612
Avg merge
4d 23h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from theskumar/python-dotenv

All issues in theskumar/python-dotenv

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.