On 9/19/05, Andrew McNamara <[EMAIL PROTECTED]> wrote: > > I agree. I find I often have an object with an optional friendly name > (label) and a manditory system name. So this sort of thing becomes common: > > '%s blah blah' % (foo.label or foo.name) > > The if-else-expression alternative works, but isn't quite as readable: > > '%s blah blah' % (foo.label ? foo.label : foo.name)
Where does this work? _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com