GH-95150: Use position and exception tables for code hashing and equality (GH-95509)

(cherry picked from commit c7e5bbaee8)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-08-01 11:33:49 -07:00 committed by GitHub
parent 76d83b1dfe
commit 7baca3c05e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 68 additions and 5 deletions

View file

@ -2012,7 +2012,8 @@ def fib(n):
a, b = 0, 1
"""
try:
self.assertEqual(compile(s1, '<string>', 'exec'), compile(s2, '<string>', 'exec'))
compile(s1, '<string>', 'exec')
compile(s2, '<string>', 'exec')
except SyntaxError:
self.fail("Indented statement over multiple lines is valid")