diff options
author | Raymond Hettinger <python@rcn.com> | 2003-11-16 16:17:49 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-11-16 16:17:49 (GMT) |
commit | a690a9967e715663b7a421c9ebdad91381cdf1e4 (patch) | |
tree | 1c5d9eeef0ac20efe39f1af11a81d745592596d1 /Doc/lib/libfuncs.tex | |
parent | d456849f19fa7b00b6560b67c5388a5a6cd89d0a (diff) | |
download | cpython-a690a9967e715663b7a421c9ebdad91381cdf1e4.zip cpython-a690a9967e715663b7a421c9ebdad91381cdf1e4.tar.gz cpython-a690a9967e715663b7a421c9ebdad91381cdf1e4.tar.bz2 |
* Migrate set() and frozenset() from the sandbox.
* Install the unittests, docs, newsitem, include file, and makefile update.
* Exercise the new functions whereever sets.py was being used.
Includes the docs for libfuncs.tex. Separate docs for the types are
forthcoming.
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r-- | Doc/lib/libfuncs.tex | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 7d64f93..abafcad 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -477,6 +477,17 @@ class C: and is known to vary.} \end{funcdesc} +\begin{funcdesc}{frozenset}{\optional{iterable}} + Return a frozenset object whose elements are taken from \var{iterable}. + Frozensets are sets that have no update methods but can be hashed and + used as members of other sets or as dictionary keys. The elements of + a frozenset must be immutable themselves. To represent sets of sets, + the inner sets should also be \class{frozenset} objects. If + \var{iterable} is not specified, returns a new empty set, + \code{frozenset([])}. + \versionadded{2.4} +\end{funcdesc} + \begin{funcdesc}{getattr}{object, name\optional{, default}} Return the value of the named attributed of \var{object}. \var{name} must be a string. If the string is the name of one of the object's @@ -897,6 +908,14 @@ class C(object): \code{round(0.5)} is \code{1.0} and \code{round(-0.5)} is \code{-1.0}). \end{funcdesc} +\begin{funcdesc}{set}{\optional{iterable}} + Return a set whose elements are taken from \var{iterable}. The elements + must be immutable. To represent sets of sets, the inner sets should + be \class{frozenset} objects. If \var{iterable} is not specified, + returns a new empty set, \code{set([])}. + \versionadded{2.4} +\end{funcdesc} + \begin{funcdesc}{setattr}{object, name, value} This is the counterpart of \function{getattr()}. The arguments are an object, a string and an arbitrary value. The string may name an |