Passing tuples transparently as function parameters (like for Threads)

Quinn Dunkan quinn at chunder.ugcs.caltech.edu
Mon Oct 30 16:05:15 EST 2000


On Mon, 30 Oct 2000 17:38:44 GMT, David Perry <dperry at utoronto.ca> wrote:
>Hey all!  This may be an RTFM, but if it is, please point me at the right
>FM. (:

FM is apply.__doc__ or lib ref -> builtin functions

Also there is some python 2 sugar:

args = [1,2,3]
kw = {'a':1, 'b':2}

x = f(*args, **kw)
    # translates to
x = apply(f, args, kw)

>(Aside: if you put a function that returns a value in a thread, how can you
>get the returned value?)

You could stick it in a class attribute or dictionary.  Don't forget to lock.



More information about the Python-list mailing list