def join(self, iterable):
        """Joins an iterable yielding strings or FmtStrs with self as separator"""
        before = []
        basefmtstrs = []
        for i, s in enumerate(iterable):
            basefmtstrs.extend(before)
            before = self.basefmtstrs
            if isinstance(s, FmtStr):
                basefmtstrs.extend(s.basefmtstrs)
            elif isinstance(s, (bytes, unicode)):
                basefmtstrs.extend(fmtstr(s).basefmtstrs) #TODO just make a basefmtstr directly
            else:
                raise TypeError("expected str or FmtStr, %r found" % type(s))
        return FmtStr(*basefmtstrs)

    # TODO make this split work like str.split
dataset/ETHPy150Open thomasballinger/curtsies/curtsies/formatstring.py/FmtStr.join/original