summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-12-19 20:50:34 (GMT)
committerGeorg Brandl <georg@python.org>2006-12-19 20:50:34 (GMT)
commit66a796e5ab8dd7bfc1fe05a830feb05acdab6f53 (patch)
tree5ce191f813c475bf54c6ab40ecaebb820327a213 /Doc
parent376446dd4e30006c4d4ad09b4cbda8b07e9ce23a (diff)
downloadcpython-66a796e5ab8dd7bfc1fe05a830feb05acdab6f53.zip
cpython-66a796e5ab8dd7bfc1fe05a830feb05acdab6f53.tar.gz
cpython-66a796e5ab8dd7bfc1fe05a830feb05acdab6f53.tar.bz2
Patch #1601678: move intern() to sys.intern().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libfuncs.tex14
-rw-r--r--Doc/lib/libsys.tex15
-rw-r--r--Doc/tut/tut.tex2
3 files changed, 16 insertions, 15 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex
index a8c06bb..7e0b88d 100644
--- a/Doc/lib/libfuncs.tex
+++ b/Doc/lib/libfuncs.tex
@@ -1262,17 +1262,3 @@ bypass these functions without concerns about missing something important.
argument).
\end{funcdesc}
-\begin{funcdesc}{intern}{string}
- Enter \var{string} in the table of ``interned'' strings and return
- the interned string -- which is \var{string} itself or a copy.
- Interning strings is useful to gain a little performance on
- dictionary lookup -- if the keys in a dictionary are interned, and
- the lookup key is interned, the key comparisons (after hashing) can
- be done by a pointer compare instead of a string compare. Normally,
- the names used in Python programs are automatically interned, and
- the dictionaries used to hold module, class or instance attributes
- have interned keys. \versionchanged[Interned strings are not
- immortal (like they used to be in Python 2.2 and before);
- you must keep a reference to the return value of \function{intern()}
- around to benefit from it]{2.3}
-\end{funcdesc}
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index 702427a..7a8859b 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -340,6 +340,21 @@ else:
\versionadded{1.5.2}
\end{datadesc}
+\begin{funcdesc}{intern}{string}
+ Enter \var{string} in the table of ``interned'' strings and return
+ the interned string -- which is \var{string} itself or a copy.
+ Interning strings is useful to gain a little performance on
+ dictionary lookup -- if the keys in a dictionary are interned, and
+ the lookup key is interned, the key comparisons (after hashing) can
+ be done by a pointer compare instead of a string compare. Normally,
+ the names used in Python programs are automatically interned, and
+ the dictionaries used to hold module, class or instance attributes
+ have interned keys. \versionchanged[Interned strings are not
+ immortal (like they used to be in Python 2.2 and before);
+ you must keep a reference to the return value of \function{intern()}
+ around to benefit from it]{2.3}
+\end{funcdesc}
+
\begin{datadesc}{last_type}
\dataline{last_value}
\dataline{last_traceback}
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex
index c76c518..4b6b93f 100644
--- a/Doc/tut/tut.tex
+++ b/Doc/tut/tut.tex
@@ -2700,7 +2700,7 @@ standard module \module{__builtin__}\refbimodindex{__builtin__}:
'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod',
'enumerate', 'eval', 'exec', 'execfile', 'exit', 'file', 'filter', 'float',
'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex',
- 'id', 'int', 'intern', 'isinstance', 'issubclass', 'iter',
+ 'id', 'int', 'isinstance', 'issubclass', 'iter',
'len', 'license', 'list', 'locals', 'long', 'map', 'max', 'min',
'object', 'oct', 'open', 'ord', 'pow', 'property', 'quit', 'range',
'reload', 'repr', 'reversed', 'round', 'set',