Skip to content

Convert LOAD_ATTR_MODULE to a constant where the module is already a constant #115651

Closed
@markshannon

Description

@markshannon

Expressions like mod.attr, where mod is a module, are in almost all cases effectively constants.

We should optimize them as such.
We already treat the mod as a constant, so it is a relatively simple step to treat mod.attr as a constant.

Linked PRs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions