]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-145743: Fix inconsistency after calling Struct.__init__() with invalid...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 10 Mar 2026 16:52:27 +0000 (17:52 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Mar 2026 16:52:27 +0000 (16:52 +0000)
commitb5082d89cc90986776323fcaaf89e14a96e8e04b
tree4f22089ee3e118f1ad556a7b6598a3c8caa3bea6
parent26326a0b4fef5452a72275a548d1bd13f0e10ccd
[3.13] gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format (GH-145744) (GH-145764)

Only set the format attribute after successful (re-)initialization.
(cherry picked from commit 3f33bf83e8496737b86333bc9ec55dc3ccb3faca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_struct.py
Modules/_struct.c