bpo-41215: Make assertion in the new parser more strict (GH-21364)

(cherry picked from commit 782f44b8fb07ec33cee148b2b6b4cf53024fe0cd)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
1 file changed