[sugar] [PATCH] Add speaker device and icon by default
Eben Eliason
eben.eliason
Thu Apr 24 12:26:24 EDT 2008
On Thu, Apr 24, 2008 at 12:14 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> On 24.04.2008, at 18:01, 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?
>
>
> It's an abuse of Python, IMHO.
Tricky and abusive often go hand in hand, and abuses of languages are
often the most interesting, though clearly not the most transparent.
=) C, for instance, seems to taunt with all of the glorious hacks it
is capable of executing as syntactically correct code. Duff's Device
[1], anyone? Of course, usually susceptibility to such temptations
result in a clean shot through one's own foot, with a sharp segfault
bullet or worse.
- Eben
[1] http://en.wikipedia.org/wiki/Duff's_device
More information about the Sugar-devel
mailing list