On Thu, 2010-03-04 at 14:42 +0100, Jiri Moskovcak wrote:
On 03/04/2010 02:24 PM, Denys Vlasenko wrote:
On Thu, 2010-03-04 at 11:49 +0100, Jiri Moskovcak wrote:
parent_window = [self.window.get_transient_for(),self.window][self.window.get_property("visible")]
report_dialog = ReporterDialog(report, self.daemon, log=self.updates, parent=parent_window)
I must admit my python-fu fails me. What v = [a,b][f()] means?
Translated to C it would look like this: f() ? b : a
Aha, you build an array and then index it with 0/1.
I would prefer just a good old if / else, for readability.
OK, done, sending just the relevant part, the rest is same:
Reviewed by: Denys Vlasenko vda.linux@googlemail.com