Closed mwermelinger closed 1 month ago
It looks like the inspect
module could be a more robust way to do this, and more specifically inspect.signature
. I'll just leave the link to the documentation here for now.
Thanks, but the inspect
documentation says that some CPython built-ins can't be handled either, so I'll just change the test
docstring.
The
test
function usesf.__code__.co_argcount
to find out how many argumentsf
has, but built-in functions don't have the__code__
attribute and thus something liketest(sorted, [...])
crashes. This is a minor limitation as we usually don't test built-in functions. The solution is toor