Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys.argv should always be a sequence #34268

Closed
smcinerney mannequin opened this issue Apr 3, 2001 · 2 comments
Closed

sys.argv should always be a sequence #34268

smcinerney mannequin opened this issue Apr 3, 2001 · 2 comments

Comments

@smcinerney
Copy link
Mannequin

smcinerney mannequin commented Apr 3, 2001

BPO 413320

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2001-04-04.18:04:23.000>
created_at = <Date 2001-04-03.04:56:55.000>
labels = []
title = 'sys.argv should always be a sequence'
updated_at = <Date 2001-04-04.18:04:23.000>
user = 'https://bugs.python.org/smcinerney'

bugs.python.org fields:

activity = <Date 2001-04-04.18:04:23.000>
actor = 'jhylton'
assignee = 'jhylton'
closed = True
closed_date = None
closer = None
components = ['None']
creation = <Date 2001-04-03.04:56:55.000>
creator = 'smcinerney'
dependencies = []
files = []
hgrepos = []
issue_num = 413320
keywords = []
message_count = 2.0
messages = ['4156', '4157']
nosy_count = 2.0
nosy_names = ['jhylton', 'smcinerney']
pr_nums = []
priority = 'low'
resolution = 'works for me'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue413320'
versions = []

@smcinerney
Copy link
Mannequin Author

smcinerney mannequin commented Apr 3, 2001

Hi,

It seems that sys.argv is not a sequence if there are
no args passed. Hence references to len() or
non-existent element sys.argv[1] cause a TypeError
which we have to kludge around with a try...except
TypeError. sys.argv should always be a sequence.

Python 1.6 (#4, Sep 13 2000, 17:24:07) [GCC
egcs-2.91.66 19990314 (egcs-1.1.2 release)] on sunos5
(Solaris 8)

Best regards,
Stephen

@smcinerney smcinerney mannequin closed this as completed Apr 3, 2001
@smcinerney smcinerney mannequin assigned jhylton Apr 3, 2001
@jhylton
Copy link
Mannequin

jhylton mannequin commented Apr 4, 2001

Logged In: YES
user_id=31392

Can you provide an example of how you invoke Python with no
args and what value sys.argv[] has? I can't reproduce.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants