[issue41615] sys.argv may be None or an empty list

Jason R. Coombs report at bugs.python.org
Sat Aug 22 08:35:17 EDT 2020


New submission from Jason R. Coombs <jaraco at jaraco.com>:

In [pypa/keyring#445](https://github.com/pypa/keyring/445) and issue839151, we learned that there are Python interpreters in which `sys.argv` is an empty list, is not a list, or is not initialized at all. Through use of `sys.argv[0]`, the documentation strongly implies that `sys.argv` is always a list of at least one element. The documentation makes no mention of these other cases. It would be nice if the documentation would describe what values (or absence thereof) are valid for `sys.argv`.

----------
assignee: docs at python
components: Documentation
messages: 375796
nosy: docs at python, jaraco
priority: normal
severity: normal
status: open
title: sys.argv may be None or an empty list

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41615>
_______________________________________


More information about the Python-bugs-list mailing list