Y
Hacker News
new
|
ask
|
show
|
jobs
by
musicale
2086 days ago
You seem to have removed the previous sentence which qualified the statement as "at runtime."
1 comments
pansa2
2086 days ago
How can I pass whatever I want into that function
at runtime
, while still satisfying the type checker?
link
dragonwriter
2086 days ago
> How can I pass whatever I want into that function at runtime, while still satisfying the type checker?
Tell the type-checker to buzz-off by any number of means, including # type: ignore
link
_flux
2086 days ago
You can use the Any type, or you can not annotate at all, though I'm not sure if the latter is something that passes some stricter modes of e.g. mypy.
link