voc icon indicating copy to clipboard operation
voc copied to clipboard

Format of TypeError message is wrong for missing arguments in some functions.

Open deep110 opened this issue 8 years ago • 1 comments

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.

deep110 avatar Mar 13 '17 17:03 deep110

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)

cflee avatar Mar 19 '17 16:03 cflee