mirror of
https://github.com/python/cpython.git
synced 2025-09-19 23:20:25 +00:00
Patch #1601678: move intern() to sys.intern().
This commit is contained in:
parent
376446dd4e
commit
66a796e5ab
12 changed files with 81 additions and 73 deletions
|
@ -28,7 +28,7 @@ functions should be applied to nil objects.
|
|||
Interning strings (ob_sstate) tries to ensure that only one string
|
||||
object with a given value exists, so equality tests can be one pointer
|
||||
comparison. This is generally restricted to strings that "look like"
|
||||
Python identifiers, although the intern() builtin can be used to force
|
||||
Python identifiers, although the sys.intern() function can be used to force
|
||||
interning of any string.
|
||||
Together, these sped the interpreter by up to 20%. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue