"unexpected" <[EMAIL PROTECTED]> wrote:
> However, I'm passing in a few variables, so I can't just take it
> out-though every single function would be passing the same variables.
>
> so something.func() is actually
> something.func(string, list)
>
> How would I modify it to include them?
just add the parameters to the call:
dispatch[value](string, list) # note: do the call here!
in Python, an explicit call is always written as
expression(argument list)
where expression yields a callable object. in your original case,
the expression was a bound method; in the modified example,
the expression is a dictionary lookup. the actual call part looks
the same way, in both cases.
</F>
--
http://mail.python.org/mailman/listinfo/python-list