The `.keys()` here and on line 1584 below ar not necessary.  The join method will work on any iterable.