Logo Search packages:      
Sourcecode: ipython version File versions  Download package

def IPython::ipstruct::Struct::__dict_invert (   self,
  dict 
) [private]

Helper function for merge. Takes a dictionary whose values are
lists and returns a dict. with the elements of each list as keys and
the original keys as values.

Definition at line 219 of file ipstruct.py.

00219                                 :
        """Helper function for merge. Takes a dictionary whose values are
        lists and returns a dict. with the elements of each list as keys and
        the original keys as values."""

        outdict = {}
        for k,lst in dict.items():
            if type(lst) is types.StringType:
                lst = lst.split()
            for entry in lst:
                outdict[entry] = k
        return outdict

    def clear(self):


Generated by  Doxygen 1.6.0   Back to index