summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/struct.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
index c94dfde..e2e6fc5 100644
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -1,6 +1,10 @@
:mod:`struct` --- Interpret bytes as packed binary data
=======================================================
+.. testsetup:: *
+
+ from struct import *
+
.. module:: struct
:synopsis: Interpret bytes as packed binary data.
@@ -597,6 +601,11 @@ The :mod:`struct` module also defines the following type:
The calculated size of the struct (and hence of the bytes object produced
by the :meth:`pack` method) corresponding to :attr:`format`.
+ .. versionchanged:: 3.13 The *repr()* of structs has changed. It
+ is now:
+
+ >>> Struct('i')
+ Struct('i')
.. _half precision format: https://en.wikipedia.org/wiki/Half-precision_floating-point_format