On Wed, Nov 15, 2017 at 4:34 PM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>
> wants_one_arg.__code__.co_argcount
>>
>>
>> 1
>>
> wants_one_arg.__code__.co_varnames
>>
>>
>> ('x',)
>
>
> That will give you some idea, but it's not foolproof -- e.g.
> if the function has * or ** arguments
Chris Angelico wrote:
wants_one_arg.__code__.co_argcount
1
wants_one_arg.__code__.co_varnames
('x',)
That will give you some idea, but it's not foolproof -- e.g.
if the function has * or ** arguments, it's impossible to tell
in general how many arguments it accepts without studying the
c
On 15Nov2017 09:12, Chris Angelico wrote:
On Wed, Nov 15, 2017 at 8:05 AM, Cameron Simpson wrote:
I know that this isn't generally solvable, but I'm wondering if it is
partially solvable.
I have a task manager which accepts callables, usually functions or
generators, and calls them on data it
On Wed, Nov 15, 2017 at 9:03 AM, Stefan Ram wrote:
> Cameron Simpson writes:
>>I would like to inspect submitted functions' signatures for suitability at
>>submission time, without calling the function. For example to see if this
>>function accepts exactly one argument, or to see if it is a gener
On Wed, Nov 15, 2017 at 8:05 AM, Cameron Simpson wrote:
> I know that this isn't generally solvable, but I'm wondering if it is
> partially solvable.
>
> I have a task manager which accepts callables, usually functions or
> generators, and calls them on data items as needed. For reasons which,
> f
I know that this isn't generally solvable, but I'm wondering if it is partially
solvable.
I have a task manager which accepts callables, usually functions or generators,
and calls them on data items as needed. For reasons which, frankly, suggest
user interface ergonomics failure to me it happe