Skip to content

Commit 32f5eed

Browse files
committed
Address review
1 parent f64b60b commit 32f5eed

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

Lib/test/test_ast/test_ast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ def cleanup():
9494

9595
del ast.AST._fields
9696

97-
msg = 'AST has no fields'
97+
msg = "type object 'ast.AST' has no attribute '_fields'"
9898
# Both examples used to crash:
99-
with self.assertRaisesRegex(TypeError, msg):
99+
with self.assertRaisesRegex(AttributeError, msg):
100100
ast.AST(arg1=123)
101-
with self.assertRaisesRegex(TypeError, msg):
101+
with self.assertRaisesRegex(AttributeError, msg):
102102
ast.AST()
103103

104104
def test_AST_garbage_collection(self):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix a crash in :mod:`ast` when ``_fields`` attribute is deleted.
1+
Fix a crash in :mod:`ast` when the :attr:`ast.AST._fields` attribute is deleted.

Python/Python-ast.c

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)