Hi,
I thought it looked cleaner, but of course it could be:if sys.platform !='darwin' : self.menu_file.add_command(label='Quit', command=self.cmd_quit)/FredrikDate: Sun, 30 Mar 2014 17:14:37 -0700
From: notifications@github.com
To: cricket@noreply.github.com
CC: nfredrik@hotmail.com
Subject: Re: [cricket] Add quit file menu if not osx. Change reference when keyboard interrupt (#32)

In cricket/view.py:

> @@ -162,6 +162,7 @@ def _setup_menubar(self):
>          # self.menu_file.add_command(label='New', command=self.cmd_dummy, accelerator="Command-N")
>          # self.menu_file.add_command(label='Open...', command=self.cmd_dummy)
>          # self.menu_file.add_command(label='Close', command=self.cmd_dummy)
> +        self.menu_file.add_command(label='Quit', command=self.cmd_quit) if sys.platform !='darwin' else None

A matter of style -- why is this an inline if that resolves to a No-op statement on OSX, rather that just a normal if with no Else clause?


—
Reply to this email directly or view it on GitHub.