def suggestion(self, dictionary, allFields, byFields): value = self.value attr = self.attr L = dictionary.get(attr) for v in L: s = entry.suggestCompletionInText(value, v) if s: D = byFields.get(attr, {}) D[s] = v byFields[attr] = D return {attr: s} # raise ValueError, "no completion found for "+repr(value) return None
def suggestion(self, dictionary, allFields, byFields): value = self.word for a in dictionary: L = dictionary.get(a) for v in L: s = entry.suggestCompletionInText(value, v) if s is not None: D = allFields.get(a, {}) D[s] = v allFields[a] = D # XXX possibly add to byFields also? return {a: s} # raise ValueError, "no completion found for "+repr(value) return None
def suggestion(self, dictionary, allFields, byFields): # XXX copied from APT above value = self.word attr = self.attr L = dictionary.get(attr) for v in L: s = entry.suggestCompletionInText(value, v) if s is not None: D = byFields.get(attr, {}) D[s] = v byFields[attr] = D return {attr: s} # raise ValueError, "no completion found for "+repr(value) return None