擅长:python、mysql、java
<p>同意<strong>@Dan D.</strong>对这个问题的看法;但令人费解的是,为什么他的解决方案不起作用(它在<code>python</code><em>shell</em>中确实有效)</p>
<p>看看这是否会给你带来好运(它只是<strong>@Dan D.</strong>解决方案的冗长变体)</p>
<pre><code>from typing import Callable
# your original check_poke function
def check_poke(arg_1: int, arg_2: int) -> bool:
# do something
# somehow returns a bool
return arg_1 < arg_2
# a function that returns a callable, that in turn invokes check_poke
# with the supplied params
def check_poke_wrapper_creator(arg_1: int, arg_2: int) -> Callable[[], bool]:
def check_poke_wrapper() -> bool:
return check_poke(arg_1=arg_1, arg_2=arg_2)
return check_poke_wrapper
..
# usage
python_callable=check_poke_wrapper_creator(129600, 600)
</code></pre>