fix for #3216 connections/connection.py failing because of conflict on `range`

over-the-shoulder review by @vexocide