News for hackers. Stuff that matters.
Re:Why Python 3 Exists by tveita on Friday December 18, 2015 @07:35AM (#10758102)
It is in Python 2, but not in Python 3, where str.encode() and bytes.decode() have been restricted to only convert between strings and bytes.

    >>> "foo".encode('zlib')
    LookupError: 'zlib' is not a text encoding; use codecs.encode() to handle arbitrary codecs

There are no comments on this comment yet.