driscollis / applications_with_wxpython

Code examples for the book, Creating GUI Application with wxPython
https://www.blog.pythonlibrary.org
116 stars 26 forks source link

Chapter 6, Page #6

Closed cmcknight closed 5 years ago

cmcknight commented 5 years ago

My Python linter complains about the use "is not" instead of != for testing string values:

“Let’s move on and learn what most of the buttons in your calculator are bound to:

def update_equation(self, event): ... 12 elif label in operators and current_equation is not '' \ 13 and self.last_button_pressed not in operators: 14 self.solution.SetValue(current_equation + ' ' + label) 15 ”

Doesn't seem to impair operation though.

driscollis commented 5 years ago

Yeah, they work in much the same way, but the linter is probably right. I will go ahead and fix that as well.