-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Eben Eliason wrote: |> + mute_item_text = self._model.props.muted and 'Unmute' or 'Mute' | | This is a tricky ternary stand-in. Very clever. Is it clear enough for others?
If you want it on one line, I would prefer a true ternary expression (new in 2.5): mute_item_text = 'Unmute' if self._model.props.muted else 'Mute' - --Ben -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIELGfUJT6e6HFtqQRAsmlAJ0UFPQhOLuWvvW7zFwR38ZjaB161ACbBhuc 9JJaPTMpBtNfOOwyzTaFv3g= =Ot34 -----END PGP SIGNATURE----- _______________________________________________ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar