codon
codon copied to clipboard
Add os.environ.setdefault(str, str) functionality
Implements os.environ.setdefault(key, default = "") functionality as in python (closes #583).
Set the value of the key environment variable to default if it did not exist and return it.
Return the value from the environment if it was already set.
import os
a = os.environ.setdefault("A", "default_value")
Thank you for your pull request. We require contributors to agree to our Contributor License Agreement (https://exaloop.io/cla.txt), and we don't have @avitkauskas on file. In order for us to review and merge your code, please email [email protected] to get yourself added.