File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change
1
+ Updates the documentation for ``os.environ['KEY'] `` when the variable does not exist - by :user: `jugmac00 `.
Original file line number Diff line number Diff line change @@ -1635,7 +1635,8 @@ If you specify a substitution string like this::
1635
1635
1636
1636
{env:KEY}
1637
1637
1638
- then the value will be retrieved as ``os.environ['KEY'] `` and raise an Error if the environment variable does not exist.
1638
+ then the value will be retrieved as ``os.environ['KEY'] `` and replaced with an empty string if the environment variable
1639
+ does not exist.
1639
1640
1640
1641
1641
1642
Environment variable substitutions with default values
@@ -1645,14 +1646,14 @@ If you specify a substitution string like this::
1645
1646
1646
1647
{env:KEY:DEFAULTVALUE}
1647
1648
1648
- then the value will be retrieved as ``os.environ['KEY'] `` and replace with DEFAULTVALUE if the environment variable does
1649
+ then the value will be retrieved as ``os.environ['KEY'] `` and replaced with DEFAULTVALUE if the environment variable does
1649
1650
not exist.
1650
1651
1651
1652
If you specify a substitution string like this::
1652
1653
1653
1654
{env:KEY:}
1654
1655
1655
- then the value will be retrieved as ``os.environ['KEY'] `` and replace with an empty string if the environment variable
1656
+ then the value will be retrieved as ``os.environ['KEY'] `` and replaced with an empty string if the environment variable
1656
1657
does not exist.
1657
1658
1658
1659
Substitutions can also be nested. In that case they are expanded starting from the innermost expression::
You can’t perform that action at this time.
0 commit comments