Skip to content

Commit

Permalink
UTF-8 exception
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Sep 23, 2024
1 parent c46a62b commit cd63998
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion peps/pep-0756.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ Export complexity
-----------------

By default, an export has a complexity of *O*\ (1): no memory is copied
and no conversion is done.
and no conversion is done. There is an exception: if only UTF-8 is
requested and the UTF-8 cache is not filled, the string is encoded to
UTF-8 to fill the cache.

If the ``PyUnicode_EXPORT_ALLOW_COPY`` flag is set, there are cases when a
copy is needed, *O*\ (*n*) complexity:
Expand Down

0 comments on commit cd63998

Please sign in to comment.