bpo-20180: convert most of itertoolsmodule.c to use Argument Clinic by taleinat · Pull Request #9164 · python/cpython

This is a followup to PRs #4117 and #4170.

As requested by @rhettinger, this PR:

  • keeps doc-strings unchanged
  • doesn't convert special dunder methods such as __reduce__ and __setstate__
  • keeps variable names unchanged e.g. predicate as func: object
  • doesn't move anything around, only adding a required list of static PyTypeObject declarations at the top

Since AC requires the doc-string to begin with a single summary line, I've kept most of those unchanged, despite in some cases exceeding 79 characters in length. @rhettinger, what should be done with those?

https://bugs.python.org/issue20180