def Match(..., Raw_packet_queue, ...): ... print 'in Match, Raw_Packet_queue is', Raw_packet_queue # this returns 'Reader object at 0xaaa' ... return [Last_Passed, Last_Dropped, Raw_packet_queue] # this causes 'unsubscriptable object'error message
#************************************************* def Main(...): Raw_packet_queue = [] ... Raw_packet_queue = enqueue(..., Raw_packet_queue, ...) # this works ... if Raw_packet_queue[ctr][1] == Passed_IP: Last_Passed, Last_Dropped, Raw_packet_queue = Match(..., Raw_packet_queue, ...) # the problem starts here ... On Wed, 2005-03-02 at 14:09, Bill Mill wrote: > Earl, > > Please post the smallest snippet of code you can which illustrates > your problem. No list is an unsubscriptable object, so you seem to be > passing something that is not a list to your function. > > As it stands, you don't give enough information to give an actual answer. > > Peace > Bill Mill > bill.mill at gmail.com > > > On Wed, 02 Mar 2005 14:05:18 -0700, Earl Eiland <[EMAIL PROTECTED]> wrote: > > I have a program in which I'm passing a list to functions. When I > > reference an element in a function to which it is passed, I get the > > error message "unsubscriptable object". When printing the list contents > > in that same function, I get "xxx is <Reader object at 0xyyyy>". How do > > I pass a list? > > > > Earl Eiland > > > > -- > > http://mail.python.org/mailman/listinfo/python-list > > -- http://mail.python.org/mailman/listinfo/python-list