On Thu, Feb 21, 2008 at 3:54 PM, Roger Demetrescu
<[EMAIL PROTECTED]> wrote:
>
>  def custom_ensure_sequence(obj):
>     """Adapted from turbogears.util.ensure_sequence"""
>     if obj is None:
>         return []
>     elif isSequenceType(obj) and not isinstance(obj, basestring):
>         return obj
>     else:
>         return [obj]


BTW, I believe this should be the correct implementation of TG's
ensure_sequence function... IMHO, of course..  :)


[]s
Roger

--~--~---------~--~----~------------~-------~--~----~
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