Skip to content

Commit 998474d

Browse files
Add a comment discussing reasons for __classcell__ manipulation
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent 074df4c commit 998474d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/collections/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ def __getnewargs__(self):
488488
'__match_args__': field_names,
489489
}
490490

491+
# gh-85795: `super()` calls inside `typing.NamedTuple` methods will not
492+
# work unless `__classcell__` is propagated by `collections._namedtuple`
491493
if classcell is not _nmtuple_classcell_sentinel:
492494
class_namespace["__classcell__"] = classcell
493495

0 commit comments

Comments
 (0)