>
> name.lower() will work as long as name is a string, and you can
> easily perform "tuple"-like actions with (my favorite):
>
> identity.is_anonymous() and "Yes" or "No"
>
> Or:
>
> ['No', 'Yes'][identity.is_anonymous()]
>

In Python 2.5 we can also do:

"Yes" if identity.is_anonymous() else "No"

which is kinda neat.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to