Louie Lu added the comment:

This behavior is as same as on my Linux Python 2.7.13:


(<Tkinter.Listbox instance at 0x7f4b2b0c08c0>, (2,)) # Select Font
(<Tkinter.Listbox instance at 0x7f4b29caf248>, (3,)) # Select Style
(<Tkinter.Listbox instance at 0x7f4b2b0c08c0>, ())   # Deselect Font


And also, you don't need a try expect to handle this situation. You can see 
that when de-select the listbox, curselection() will return an empty tuple, you 
only need an if statement to handle this:

    def get_style(event):
        lb_sty_cur = event.widget.curselection()
        if lb_sty_cur:
            lb_sty_get = listbox_style.get(lb_sty_cur)
            self.style.set(lb_sty_get)
        return

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30200>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to