GH-117750: When clearing object's dict, clear inline values but leave… · python/cpython@784e076 · GitHub
Skip to content

Commit 784e076

Browse files
authored
GH-117750: When clearing object's dict, clear inline values but leave dict attached (GH-117808)
1 parent 7d0be7a commit 784e076

3 files changed

Lines changed: 31 additions & 15 deletions

File tree

Lib/test/test_class.py

Lines changed: 10 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix issue where an object's dict would get out of sync with the object's
2+
internal values when being cleared. ``obj.__dict__.clear()`` now clears the
3+
internal values, but leaves the dict attached to the object.

Objects/dictobject.c

Lines changed: 18 additions & 15 deletions

0 commit comments

Comments
 (0)