New function `repr_args` in `pprint` or `reprlib`

I think reprlib is the most logical place for this.

This would fit within the module’s description as having repr related tools. Already is have recursive_repr which doesn’t have anything to do with size limited output.

I guess we can leave the old implementation untouched, if it works.

I also found inspect.formatargvalues. It sorta overlaps with the proposed functionality, but it’s not very well-suited for this specific job, because

  • it only formats kwargs
  • it supports variadic args/kwargs
  • it has 4 required arguments