Skip to content

Commit

Permalink
Intern the __qualname__ identifier used by PyType::name.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreichold committed Apr 4, 2022
1 parent 89577a2 commit 821b28d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/typeobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl PyType {

/// Gets the name of the `PyType`.
pub fn name(&self) -> PyResult<&str> {
self.getattr("__qualname__")?.extract()
self.getattr(intern!(self.py(), "__qualname__"))?.extract()
}

/// Checks whether `self` is a subclass of `other`.
Expand Down

0 comments on commit 821b28d

Please sign in to comment.