Skip to content

Audit the correctness of adding parent.name to child's locals in ClassDef.__init__() and FunctionDef.__init__() #1490

Closed
@jacobtylerwalls

Description

@jacobtylerwalls

Apparently, bugs can be caused by providing the parent argument to ClassDef.__init__(), because the name of that node (the ancestor) will be added to the locals of the child node, and this may not be intended (it wasn't intended in the case of subclassing a namedtuple. We need to audit whether it is happening anywhere else and if that behavior is correct.

See discussion at #1489 (comment).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions