Thanks thats brilliant. Brendan
On 4/9/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Apr 9, 2007, at 2:38 PM, Brendan Arnold wrote: > > > > > Hi there, > > > >> of course theres another view of this, which is why does your > >> application prefer a "blank" Address entry to None? the latter is > >> more semantically correct. > > > > > > <dl> > > <dt>Name:</dt> > > <dd>${person.name}</dd> > > <dt>City:</dt> > > % if person.address: > > % city = person.address.city > > % else: > > % city = 'Not specified' > > <dd>${city}</dd> > > </dl> > > gotya. the None version is like: > > ${person.address and person.address.city or "Not Specified"} > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---