In message <e8b46ea8-8d1e-4db9-91ba-501fd1a44...@g18g2000yqk.googlegroups.com>, James Harris wrote:
> On 29 Sep, 18:20, Seebs <usenet-nos...@seebs.net> wrote: > >> On 2010-09-29, Tracubik <affdfsdfds...@b.com> wrote: >> >>> button = gtk.Button(("False,", "True,")[fill==True]) >> >> Oh, what a nasty idiom. > > I'm surprised you don't like this construct. I hadn't seen it until I > read the OP's question just now. However, it's meaning was immediately > apparent. I’ve used it a lot, from habit because I only started heavily using Python with version 2.4. I’m still not sure I’m comfortable with “<true-part> if <cond> else <false- part>”, when just about every other language manages to standardize on “<cond> ? <true-part> : <false-part>”. -- http://mail.python.org/mailman/listinfo/python-list