Is the itertools C module included somehow in the main Python binary in 3.x?
Assuming that the C module is built and included, which it appears to be:
In Python 3, the itertools extension is compiled into the main Python binary:
>>> import sys
>>> 'itertools' in sys.builtin_module_names
True
See the sys.builtin_module_names documentation:
A tuple of strings giving the names of all modules that are compiled into this Python interpreter.
The module was added to the Python binary because it is used very widely in the Python standard library.
The list of modules to include is taken from the Modules/Setup.dist file in the Python distribution; itertools was added together with _collections, as it is a transient dependency of that module. See issue #9545.