Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /opt/doc/python-2.3.4/html/Python-Docs-2.3.4/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 5.13 sets -- Unordered collections of unique elementsNew in version 2.3. The sets module provides classes for constructing and manipulating unordered collections of unique elements. Common uses include membership testing, removing duplicates from a sequence, and computing standard math operations on sets such as intersection, union, difference, and symmetric difference.
Like other collections, sets support
Most set applications use the Set class which provides every set
method except for __hash__(). For advanced applications requiring
a hash method, the ImmutableSet class adds a __hash__()
method but omits methods which alter the contents of the set. Both
Set and ImmutableSet derive from BaseSet, an
abstract class useful for determining whether something is a set:
The set classes are implemented using dictionaries. As a result, sets
cannot contain mutable elements such as lists or dictionaries.
However, they can contain immutable collections such as tuples or
instances of ImmutableSet. For convenience in implementing
sets of sets, inner sets are automatically converted to immutable
form, for example,
See About this document... for information on suggesting changes. |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0084 ]-- |