Marc-Andre Lemburg <[email protected]> added the comment:
Jeff Bradberry wrote:
>
> Jeff Bradberry <[email protected]> added the comment:
>
> Ok, fixed. I am kind of vague, though, on the usefulness of str.encode
> and unicode.decode.
codecs can work on any combination of types. Here's an example of
a codec that accepts str and unicode and returns str:
'313233'
>>> u'123'.encode('hex')
'313233'
>>> '313233'.decode('hex')
'123'
>>> u'313233'.decode('hex')
'123'
In 3.1 the method don't support this anymore, since they are more
strict w/r to type checking.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue6300>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com