Hi, > What is your actual use-case btw? Is it really for converting to unicode, or > more to have some declarative repr-functionality? That I'd like to see.
My main use case is populating SingleSelectFields - my fledgling tw2 framework uses roughly [(x.id, unicode(x)) for x in Table.query.all()] to populate these. Having __unicode__ defined is important. It's much better to use this rather than __str__ so my applications are unicode safe end-to-end. This isn't just tw2 craziness; Django takes the same approach. So all I want is a shorter way of defining the __unicode__ method. Your idea of UnicodeEntity is definitely better than my current approach. I would like to save another line and be able to say "tounicode=True" but maybe that is a bad idea. Paul -- You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en.
