This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: error in the sys module documentation
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: daikinoko, georg.brandl
Priority: normal Keywords:

Created on 2007-03-13 09:57 by daikinoko, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg31503 - (view) Author: David Fillinger (daikinoko) Date: 2007-03-13 09:57
In this text from the sys module documentation: http://docs.python.org/lib/module-sys.html

"argv
    The list of command line arguments passed to a Python script. argv[0] is the script name (it is operating system dependent whether this is a full pathname or not). If the command was executed using the -c command line option to the interpreter, argv[0] is set to the string '-c'. If no script name was passed to the Python interpreter, argv has zero length."

the second argv[0] should be argv[1] because argv[0] is the name of the script.
msg31504 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-13 13:23
No, it's correct as it is. There *is no* scriptname with -c.
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44707
2007-03-13 09:57:53daikinokocreate