* src/NameDisplay.py: Rename local var id -> num

to avoid collission with the builtin function id().


svn: r7109
This commit is contained in:
Alex Roitman 2006-08-01 20:31:19 +00:00
parent d05a9bdc86
commit ffe0bdf5cc
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,6 @@
2006-08-01 Alex Roitman <shura@gramps-project.org> 2006-08-01 Alex Roitman <shura@gramps-project.org>
* src/NameDisplay.py: Rename local var id -> num
to avoid collission with the builtin function id().
* src/GrampsDb/_GrampsBSDDB.py (set_name_group_mapping): Use * src/GrampsDb/_GrampsBSDDB.py (set_name_group_mapping): Use
transaction. transaction.

View File

@ -284,8 +284,8 @@ class NameDisplay:
@returns: Returns the L{Name} string representation @returns: Returns the L{Name} string representation
@rtype: str @rtype: str
""" """
id = self._is_format_valid(name.sort_as) num = self._is_format_valid(name.sort_as)
return self.name_formats[id][_F_FN](name) return self.name_formats[num][_F_FN](name)
def raw_sorted_name(self,raw_data): def raw_sorted_name(self,raw_data):
""" """
@ -298,8 +298,8 @@ class NameDisplay:
@returns: Returns the L{Name} string representation @returns: Returns the L{Name} string representation
@rtype: str @rtype: str
""" """
id = self._is_format_valid(raw_data[_SORT]) num = self._is_format_valid(raw_data[_SORT])
return self.name_formats[id][_F_RAWFN](raw_data) return self.name_formats[num][_F_RAWFN](raw_data)
def display(self,person): def display(self,person):
""" """
@ -345,8 +345,8 @@ class NameDisplay:
if name == None: if name == None:
return "" return ""
id = self._is_format_valid(name.display_as) num = self._is_format_valid(name.display_as)
return self.name_formats[id][_F_FN](name) return self.name_formats[num][_F_FN](name)
def display_given(self,person): def display_given(self,person):
name = person.get_primary_name() name = person.get_primary_name()