Commit d921dd6
py/objmodule: Avoid interning a string unnecessarily.
If the lookup of the module name less the leading "u" is going to succeed,
it's already a qstr (because that qstr is the key in
`mp_builtin_extensible_module_map`). So, use a function that will avoid
interning it if it's not already.
For example, if you `import unavailable` it used to intern the string
`navailable`, but now it won't.
Signed-off-by: Jeff Epler <[email protected]>1 parent 4128457 commit d921dd6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
0 commit comments