[Q] keeping *args and using it later

Joao Neto vascog at uol.com.br
Sun Oct 24 07:44:39 EDT 1999


Hi!

If I use a method to receive another method and its arguments, something
like:

def keepCall( method, *args )
   newTuple = (method, args)
   myQueue.append( newTuple)

How can I call that method later? Just typing

   nextTuple = myQueue[0]
   myQueue.remove(nextTuple)

   nextTuple[0](nextTuple[1])

doesn't seem to work...

Thanks in advance!

Joao






More information about the Python-list mailing list