1

In the Python 2 documentation, for codecs.Codec it states, "Use StreamCodec for codecs which have to keep state in order to make encoding/decoding efficient".

However, StreamCodec is not documented within the codecs module, and nor does it appear anywhere else in the documentation.

How does StreamCodec differ to Codec? Is there any difference in the API or its guarantees, and are there any specific attributes where state should be stored?

1

1 Answer 1

1

It is a mistake in Python documentation. It should read StreamReader/StreamWriter.

Related bug in Python Bug Tracker is here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.