voc
voc copied to clipboard
Format of TypeError message is wrong for missing arguments in some functions.
For example, when I was implementing dict.fromkeys() and checked with no args, this was result.
fromkeys() missing 1 required positional argument: 'iterable' --> getting in voc fromkeys expected at least 1 arguments, got 0 --> expected
This is an issue in many functions beacuse as @cflee pointed out in https://github.com/pybee/voc/pull/391 this error message is triggered by cpython's getargs.c unpack_stack() and can be triggered elsewhere too, not just from Dict objects.
I will be adding more places, where this same issue may be genrated.
I'm not entirely sure if it's related yet, but I just spotted some similar in str.rfind():
Observed output:
rfind() missing 1 required positional argument: 'item'
Expected output:
rfind() takes at least 1 argument (0 given)