controls/TextCtrlAutoComplete.py
changeset 1852 70c1cc354a8f
parent 1832 0f1081928d65
child 1881 091005ec69c4
--- a/controls/TextCtrlAutoComplete.py	Mon Oct 09 12:30:14 2017 +0300
+++ b/controls/TextCtrlAutoComplete.py	Mon Oct 09 16:04:39 2017 +0300
@@ -37,11 +37,12 @@
 
 class PopupWithListbox(wx.PopupWindow):
 
-    def __init__(self, parent, choices=[]):
+    def __init__(self, parent, choices=None):
         wx.PopupWindow.__init__(self, parent, wx.BORDER_SIMPLE)
 
         self.ListBox = wx.ListBox(self, -1, style=wx.LB_HSCROLL | wx.LB_SINGLE | wx.LB_SORT)
 
+        choices = [] if choices is None else choices
         self.SetChoices(choices)
 
         self.ListBox.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)