annotate Doc/lib/libintro.tex @ 4566:6403c94de50d legacy-trunk

Added safeguard against failure in __del__.
author Guido van Rossum <guido@python.org>
date Wed, 27 Nov 1996 19:39:58 +0000
parents 6c89df576d91
children 1421aceae346
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 \chapter{Introduction}
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
2
2622
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
3 The ``Python library'' contains several different kinds of components.
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
4
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
5 It contains data types that would normally be considered part of the
2630
6c89df576d91 minor things
Guido van Rossum <guido@python.org>
parents: 2622
diff changeset
6 ``core'' of a language, such as numbers and lists. For these types,
6c89df576d91 minor things
Guido van Rossum <guido@python.org>
parents: 2622
diff changeset
7 the Python language core defines the form of literals and places some
6c89df576d91 minor things
Guido van Rossum <guido@python.org>
parents: 2622
diff changeset
8 constraints on their semantics, but does not fully define the
6c89df576d91 minor things
Guido van Rossum <guido@python.org>
parents: 2622
diff changeset
9 semantics. (On the other hand, the language core does define
2622
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
10 syntactic properties like the spelling and priorities of operators.)
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
11
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
12 The library also contains built-in functions and exceptions ---
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
13 objects that can be used by all Python code without the need of an
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
14 \code{import} statement. Some of these are defined by the core
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
15 language, but many are not essential for the core semantics and are
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
16 only described here.
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
17
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
18 The bulk of the library, however, consists of a collection of modules.
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
19 There are many ways to dissect this collection. Some modules are
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
20 written in C and built in to the Python interpreter; others are
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
21 written in Python and imported in source form. Some modules provide
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
22 interfaces that are highly specific to Python, like printing a stack
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
23 trace; some provide interfaces that are specific to particular
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
24 operating systems, like socket I/O; others provide interfaces that are
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
25 specific to a particular application domain, like the World-Wide Web.
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
26 Some modules are avaiable in all versions and ports of Python; others
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
27 are only available when the underlying system supports or requires
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
28 them; yet others are available only when a particular configuration
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
29 option was chosen at the time when Python was compiled and installed.
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
30
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
31 This manual is organized ``from the inside out'': it first describes
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
32 the built-in data types, then the built-in functions and exceptions,
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
33 and finally the modules, grouped in chapters of related modules. The
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
34 ordering of the chapters as well as the ordering of the modules within
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
35 each chapter is roughly from most relevant to least important.
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
36
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
37 This means that if you start reading this manual from the start, and
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
38 skip to the next chapter when you get bored, you will get a reasonable
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
39 overview of the available modules and application areas that are
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
40 supported by the Python library. Of course, you don't \emph{have} to
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
41 read it like a novel --- you can also browse the table of contents (in
2630
6c89df576d91 minor things
Guido van Rossum <guido@python.org>
parents: 2622
diff changeset
42 front of the manual), or look for a specific function, module or term
2622
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
43 in the index (in the back). And finally, if you enjoy learning about
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
44 random subjects, you choose a random page number (see module
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
45 \code{rand}) and read a section or two.
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
46
61e3b60aec44 rewritten introduction
Guido van Rossum <guido@python.org>
parents: 1471
diff changeset
47 Let the show begin!