On 11 août 2012, at 11:00, Aymeric Augustin wrote:
> Thanks for all your answers. A decorator will indeed be the cleanest solution.

Given the large number of existing __unicode__ methods (66 in django, 375 in 
the tests) I've written a custom 2to3 fixer to perform the transformation.

https://github.com/aaugustin/django/commits/py3-2to3

To try it, checkout the branch and run:
$ django2to3.py django tests
(assuming django/bin is on your path).
 
Do you think the Django distribution include include this fixer? It could be 
useful to developers porting pluggable apps, but I can't vouch for its quality 
— it's the first time I touch 2to3. Should I just put in extras/ with some 
basic instructions?

Best regards,

-- 
Aymeric.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to