[Python-bugs-list] [ python-Bugs-413320 ] sys.argv should always be a sequence

noreply@sourceforge.net noreply@sourceforge.net
Wed, 11 Apr 2001 07:07:06 -0700


Bugs item #413320, was updated on 2001-04-02 21:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=413320&group_id=5470

Category: None
Group: None
Status: Open
>Priority: 2
Submitted By: Stephen McInerney (smcinerney)
Assigned to: Jeremy Hylton (jhylton)
Summary: sys.argv should always be a sequence

Initial Comment:
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

----------------------------------------------------------------------

Comment By: Jeremy Hylton (jhylton)
Date: 2001-04-04 11:04

Message:
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.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=413320&group_id=5470