[gnome-tweak-tool] no need to dupe a list when a generator will do
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] no need to dupe a list when a generator will do
- Date: Tue, 26 Mar 2013 22:32:51 +0000 (UTC)
commit 2bfa66e8d8444f33d69ca2a5d1129aed8078e9c9
Author: John Stowers <john stowers gmail com>
Date: Sun Mar 24 21:41:40 2013 +0100
no need to dupe a list when a generator will do
gtweak/tweakmodel.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/tweakmodel.py b/gtweak/tweakmodel.py
index 97cce66..8e73307 100644
--- a/gtweak/tweakmodel.py
+++ b/gtweak/tweakmodel.py
@@ -122,11 +122,11 @@ class TweakModel(Gtk.ListStore):
@property
def tweaks(self):
- return [t for row in self for t in row[TweakModel.COLUMN_TWEAK].tweaks]
+ return (t for row in self for t in row[TweakModel.COLUMN_TWEAK].tweaks)
@property
def tweak_groups(self):
- return [row[TweakModel.COLUMN_TWEAK] for row in self]
+ return (row[TweakModel.COLUMN_TWEAK] for row in self)
def load_tweaks(self):
if 1:
@@ -178,7 +178,7 @@ class TweakModel(Gtk.ListStore):
group.set_tweaks(tweak)
def search_matches(self, txt):
- return [t for t in self.tweaks if t.search_matches(txt)]
+ return (t for t in self.tweaks if t.search_matches(txt))
def get_tweakgroup_iter(self, name):
return self._tweak_group_iters[name]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]