]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] 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:55:58 +0000 (17:55 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Mar 2026 16:55:58 +0000 (16:55 +0000)
commit7e389260aa3a1b56c1b986c1ed9ef180d645ede0
tree6921e733ee72e734e2dbb94a045fcb31f8d4b815
parent6d9221c7d11a92dbbd51c138d76b01c6380ddd50
[3.14] gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format (GH-145744) (GH-145763)

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