khard/carddav_object.py
def _get_private_objects(self):
        """
        :rtype: dict(str, list(str))
        """
        private_objects = {}
        for child in self.vcard.getChildren():
            if child.name.lower().startswith("x-"):
                try:
                    key_index = [
                        x.lower() for x in self.supported_private_objects
                    ].index(child.name[2:].lower())
                except ValueError:
                    pass
                else:
                    key = self.supported_private_objects[key_index]
                    if key not in private_objects:
                        private_objects[key] = []
                    private_objects[key].append(child.value)
        # sort private object lists
        for value in private_objects.values():
            value.sort()
        return private_objects
def _get_private_objects(self):
        """
        :rtype: dict(str, list(str))
        """
        private_objects = {}
        for child in self.vcard.getChildren():
            if child.name.lower().startswith("x-"):
                try:
                    key_index = [
                        x.lower() for x in self.supported_private_objects
                    ].index(child.name[2:].lower())
                except ValueError:
                    pass
                else:
                    key = self.supported_private_objects[key_index]
                    if key not in private_objects:
                        private_objects[key] = []
                    private_objects[key].append(child.value)
        # sort private object lists
        for value in private_objects.values():
            value.sort()
        return private_objects
def _get_private_objects ( self ) : private_objects = { } for child in self . vcard . getChildren ( ) : if child . name . lower ( ) . startswith ( "x-" ) : try : key_index = [ x . lower ( ) for x in self . supported_private_objects ] . index ( child . name [ 2 : ] . lower ( ) ) except ValueError : pass else : key = self . supported_private_objects [ key_index ] if key not in private_objects : private_objects [ key ] = [ ] private_objects [ key ] . append ( child . value ) # sort private object lists for value in private_objects . values ( ) : value . sort ( ) return private_objects
:rtype: dict(str, list(str))
: rtype : dict ( str list ( str ))