[billreminder] Minor tweak to conditional statement to take advantage of newer python features and to shorten the l



commit 296c516cf246969c4d9a7633f4f456e0aafdeddb
Author: Og B. Maciel <ogmaciel gnome org>
Date:   Fri Nov 13 12:54:45 2009 -0500

    Minor tweak to conditional statement to take advantage of newer python features and to shorten the line.

 src/gui/maindialog.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gui/maindialog.py b/src/gui/maindialog.py
index a9b4766..26f2e0f 100644
--- a/src/gui/maindialog.py
+++ b/src/gui/maindialog.py
@@ -424,7 +424,7 @@ class MainDialog:
             # Fetch record from database
             record = self.actions.get_bills(id=self.currentrecord.id)[0]
             # Toggle paid field
-            record.paid = record.paid == False and True or False
+            record.paid = False if record.paid else True
 
             try:
                 # Edit bill in the database



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