I don't understand PEP 308.
Greg Krohn ('rot-13')
'tert at pncen.hf'.decode
Wed Mar 12 23:37:56 EST 2003
"Tetsuo" <member16943 at dbforums.com> wrote in message
news:2635252.1047490747 at dbforums.com...
>
> I saw there's a debate over it, and decided to read it. I didn't read
> much, but what I can understand is that it proposes an if-then
> statement.
>
> So how is it different from what's there already? You know...
>
> if a == abs(g):
> ...print "a = abs(" + str(g) + ")"
> else:
> ...print zlib.compress(str(locals())
>
> --
> Posted via http://dbforums.com
Basically, instead of:
if cond:
a = tval
else:
a = fval
You can do:
a = cond ? tval : fval
More information about the Python-list
mailing list