Is it possible to determine what a function needs for parameters -
Gary Herron
gherron at islandtraining.com
Wed May 2 11:25:43 EDT 2007
rh0dium wrote:
>> This is far more work than you need. Push an (args, kwargs) tuple into
>> your arguments queue and call self.function(*args, **kwargs).
>>
>
> No see I tried that and that won't work.
>
Won't work? How does it fail?
> I'm assuming what you are referring to is this (effectively)
>
> Q.put(((),{a:"foo", b:"bar}))
>
> input = Q.get()
> self.function( *input[0], **input[1])
>
> This will obviously fail if several conditions aren't met - hence the
> kludge. Am I missing something here?
>
>
Obviously? Conditions? What conditions?
We do things like this constantly, and in fact, it *does* work.
Please tell us how it fails, or what is unsatisfactory about it.
Gary Herron
More information about the Python-list
mailing list