[docs] [issue32573] sys.argv documentation should include caveat for embedded environments

Nick Coghlan report at bugs.python.org
Wed Jan 17 00:27:28 EST 2018


Nick Coghlan <ncoghlan at gmail.com> added the comment:

There are actually 3 attributes that may be absent when CPython itself isn't managing the C level entry point: sys.argv, sys.warnoptions, and sys._xoptions.

I'd be more inclined to make the implementation match the docs though, and have these all be empty lists in the not-configured case, rather than absent entirely. (Accessing sys.argv[0] would still be an error in that situation, just an IndexError instead of an AttributeError)

----------

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


More information about the docs mailing list