py/gadict.py
changeset 569 5709d5bd349b
parent 568 4b610eaaf4be
child 582 92a189ed49b6
--- a/py/gadict.py	Wed Sep 21 22:46:28 2016 +0300
+++ b/py/gadict.py	Wed Sep 21 22:57:21 2016 +0300
@@ -50,8 +50,6 @@
             raise ParseException("Part of speech expected...\n")
         self.pos = pos
         self.tr_list = tr_list
-        if not tr_list:
-            self.tr_list = []
         self.ex_list = ex_list
         self.glos_list = glos_list
         self.ant_list = ant_list
@@ -60,7 +58,10 @@
         self.topic_list = topic_list
 
     def add_tr(self, tr):
-        self.tr_list.append(tr)
+        if self.tr_list:
+            self.tr_list.append(tr)
+        else:
+            self.tr_list = [tr]
 
     def add_ex(self, ex):
         if self.ex_list: