def fromkeys(cls, S, v=None):
        kt = vt = None

        if len(S) > 0:
            kt, = set((type(s) for s in S))

        if v is not None:
            vt = type(v)

        retval = tdict(kt, vt)

        for s in S:
            retval[s] = v

        return retval