Message362689
The documentation states that "*key*, *default* and the result are str." at https://github.com/python/cpython/blame/3.8/Doc/library/os.rst#L224 but either I'm missing something or it's not actually true:
$ python -c 'import os; print(type(os.getenv("FOO")))'
<class 'NoneType'>
$ python -c 'import os; print(type(os.getenv("FOO", default=1)))'
<class 'int'>
Only *key* needs to be a string as it is used to lookup the value in os.environ.
I think this can be fixed by a new contributor |
|
Date |
User |
Action |
Args |
2020-02-26 11:44:26 | remi.lapeyre | set | recipients:
+ remi.lapeyre, docs@python |
2020-02-26 11:44:26 | remi.lapeyre | set | messageid: <1582717466.93.0.921378424861.issue39759@roundup.psfhosted.org> |
2020-02-26 11:44:26 | remi.lapeyre | link | issue39759 messages |
2020-02-26 11:44:26 | remi.lapeyre | create | |
|