Feedback on gnome-devel-demos/3.22/buttonbox.py.page



Hi!

Pressing the C button breaks the calculator in the code sample when run.

Line 92 of code example should be:
self.entry.set_text('0')

instead of what it currently is:
self.entry.set_text('')

otherwise, line 96:
new_digit = int(button.get_label())

throws an error:
ValueError: invalid literal for int() with base 10: ''

because int() does not accept empty strings. 

Hope this helps.

Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]