News for hackers. Stuff that matters.
Re:The Python IAQ: Infrequently Answered Questions by adambyrtek on Friday November 12, 2010 @10:47AM (#1897993)
It's worth noting that Peter himself mentions that most of the ternary tricks he describes are not very readable and wouldn't be considered Pythonic.

   Beautiful is better than ugly.
   Explicit is better than implicit.
   Simple is better than complex.
Personally I'd hate to see something like that in any real-world project.

   (test and [result] or [alternative])[0]
Re:The Python IAQ: Infrequently Answered Questions by cema on Friday November 12, 2010 @12:39PM (#1898416)
Depending on the language, it could be an idiom.