Feedback on gnome-devel-demos/3.22/buttonbox.py.page
- From: "bewresu ." <bewresu gmail com>
- To: docs-feedback gnome org
- Subject: Feedback on gnome-devel-demos/3.22/buttonbox.py.page
- Date: Sun, 4 Jun 2017 08:54:12 +0800
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:
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]