Avoid O(N**2) bottleneck in _communicate_(). Fixes #1598181.
Avoid O(N**2) bottleneck in _communicate_(). Fixes #1598181.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator