Originally reported by: Tom Grainger (Bitbucket: graingert, GitHub: graingert)
Django uses https://github.com/django/django/blob/master/django/utils/encoding.py#L26
to support both python2 and python3 style __unicode__ and __str__ renames.
the Python 3 porting guide suggests http://docs.python.org/3/howto/pyporting.html#str-unicode
This pattern is likely to be used in lots of projects hoping to support both 3k and 2, so I think it should be included in six.
- Bitbucket: https://bitbucket.org/gutworth/six/issue/15
该提问来源于开源项目:benjaminp/six