[sugar] [PATCH] Add speaker device and icon by default

Benjamin M. Schwartz bmschwar
Thu Apr 24 12:13:19 EDT 2008


-----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-----



More information about the Sugar-devel mailing list