On 9/19/05, Andrew McNamara <andrewm at object-craft.com.au> 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?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4