[Adium-devl] Apparently clang's static analyzer can handle Adium
Peter Hosey
prh at boredzo.org
Fri Jul 18 14:09:52 UTC 2008
On Jul 18, 2008, at 06:45:45, Ryan Govostes wrote:
> As it stands it's a pretty hideous script, with hardcoded paths and
> requiring a little bit of hand tweaking of both input and output.
> Behold:
>
> msg = "(repeat of [" + q[2] + " this]"
> if int(r[4]) > int(q[4]):
> msg += ", " + str(int(q[4]) - int(r[4])) + " lines"
> elif int(r[4]) < int(q[4]):
> msg += ", +" + str(int(q[4]) - int(r[4])) + " lines"
> msg += ") "
> z = q[0:5] + (msg + q[5],)
>
> I hate immutable tuples
Use list() to convert the tuple to a list. Then it's mutable.
> and the lack of a ternary operator.
C: x ? y : z
Python 2.5: y if x else z
More information about the devel
mailing list