annotate Misc/HISTORY @ 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 a3b09a71162b
children 7254ee2a8abd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 Python history
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 --------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
3
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 This file contains the release messages for previous Python releases
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 (slightly edited to adapt them to the format of this file). As you
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
6 read on you go back to the dark ages of Python's history.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
7
1948
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
8
3866
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
9 =====================================
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
10 ==> Release 1.3 (13 October 1995) <==
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
11 =====================================
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
12
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
13 Major change
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
14 ============
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
15
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
16 Two words: Keyword Arguments. See the first section of Chapter 12 of
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
17 the Tutorial.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
18
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
19 (The rest of this file is textually the same as the remaining sections
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
20 of that chapter.)
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
21
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
22
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
23 Changes to the WWW and Internet tools
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
24 =====================================
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
25
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
26 The "htmllib" module has been rewritten in an incompatible fashion.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
27 The new version is considerably more complete (HTML 2.0 except forms,
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
28 but including all ISO-8859-1 entity definitions), and easy to use.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
29 Small changes to "sgmllib" have also been made, to better match the
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
30 tokenization of HTML as recognized by other web tools.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
31
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
32 A new module "formatter" has been added, for use with the new
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
33 "htmllib" module.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
34
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
35 The "urllib"and "httplib" modules have been changed somewhat to allow
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
36 overriding unknown URL types and to support authentication. They now
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
37 use "mimetools.Message" instead of "rfc822.Message" to parse headers.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
38 The "endrequest()" method has been removed from the HTTP class since
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
39 it breaks the interaction with some servers.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
40
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
41 The "rfc822.Message" class has been changed to allow a flag to be
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
42 passed in that says that the file is unseekable.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
43
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
44 The "ftplib" module has been fixed to be (hopefully) more robust on
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
45 Linux.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
46
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
47 Several new operations that are optionally supported by servers have
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
48 been added to "nntplib": "xover", "xgtitle", "xpath" and "date".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
49
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
50 Other Language Changes
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
51 ======================
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
52
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
53 The "raise" statement now takes an optional argument which specifies
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
54 the traceback to be used when printing the exception's stack trace.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
55 This must be a traceback object, such as found in "sys.exc_traceback".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
56 When omitted or given as "None", the old behavior (to generate a stack
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
57 trace entry for the current stack frame) is used.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
58
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
59 The tokenizer is now more tolerant of alien whitespace. Control-L in
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
60 the leading whitespace of a line resets the column number to zero,
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
61 while Control-R just before the end of the line is ignored.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
62
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
63 Changes to Built-in Operations
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
64 ==============================
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
65
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
66 For file objects, "f.read(0)" and "f.readline(0)" now return an empty
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
67 string rather than reading an unlimited number of bytes. For the
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
68 latter, omit the argument altogether or pass a negative value.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
69
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
70 A new system variable, "sys.platform", has been added. It specifies
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
71 the current platform, e.g. "sunos5" or "linux1".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
72
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
73 The built-in functions "input()" and "raw_input()" now use the GNU
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
74 readline library when it has been configured (formerly, only
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
75 interactive input to the interpreter itself was read using GNU
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
76 readline). The GNU readline library provides elaborate line editing
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
77 and history. The Python debugger ("pdb") is the first beneficiary of
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
78 this change.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
79
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
80 Two new built-in functions, "globals()" and "locals()", provide access
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
81 to dictionaries containming current global and local variables,
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
82 respectively. (These augment rather than replace "vars()", which
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
83 returns the current local variables when called without an argument,
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
84 and a module's global variables when called with an argument of type
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
85 module.)
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
86
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
87 The built-in function "compile()" now takes a third possible value for
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
88 the kind of code to be compiled: specifying "'single'" generates code
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
89 for a single interactive statement, which prints the output of
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
90 expression statements that evaluate to something else than "None".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
91
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
92 Library Changes
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
93 ===============
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
94
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
95 There are new module "ni" and "ihooks" that support importing modules
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
96 with hierarchical names such as "A.B.C". This is enabled by writing
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
97 "import ni; ni.ni()" at the very top of the main program. These
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
98 modules are amply documented in the Python source.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
99
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
100 The module "rexec" has been rewritten (incompatibly) to define a class
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
101 and to use "ihooks".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
102
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
103 The "string.split()" and "string.splitfields()" functions are now the
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
104 same function (the presence or absence of the second argument
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
105 determines which operation is invoked); similar for "string.join()"
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
106 and "string.joinfields()".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
107
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
108 The "Tkinter" module and its helper "Dialog" have been revamped to use
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
109 keyword arguments. Tk 4.0 is now the standard. A new module
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
110 "FileDialog" has been added which implements standard file selection
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
111 dialogs.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
112
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
113 The optional built-in modules "dbm" and "gdbm" are more coordinated
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
114 --- their "open()" functions now take the same values for their "flag"
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
115 argument, and the "flag" and "mode" argument have default values (to
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
116 open the database for reading only, and to create the database with
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
117 mode "0666" minuse the umask, respectively). The memory leaks have
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
118 finally been fixed.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
119
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
120 A new dbm-like module, "bsddb", has been added, which uses the BSD DB
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
121 package's hash method.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
122
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
123 A portable (though slow) dbm-clone, implemented in Python, has been
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
124 added for systems where none of the above is provided. It is aptly
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
125 dubbed "dumbdbm".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
126
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
127 The module "anydbm" provides a unified interface to "bsddb", "gdbm",
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
128 "dbm", and "dumbdbm", choosing the first one available.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
129
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
130 A new extension module, "binascii", provides a variety of operations
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
131 for conversion of text-encoded binary data.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
132
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
133 There are three new or rewritten companion modules implemented in
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
134 Python that can encode and decode the most common such formats: "uu"
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
135 (uuencode), "base64" and "binhex".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
136
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
137 A module to handle the MIME encoding quoted-printable has also been
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
138 added: "quopri".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
139
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
140 The parser module (which provides an interface to the Python parser's
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
141 abstract syntax trees) has been rewritten (incompatibly) by Fred
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
142 Drake. It now lets you change the parse tree and compile the result!
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
143
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
144 The \code{syslog} module has been upgraded and documented.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
145
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
146 Other Changes
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
147 =============
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
148
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
149 The dynamic module loader recognizes the fact that different filenames
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
150 point to the same shared library and loads the library only once, so
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
151 you can have a single shared library that defines multiple modules.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
152 (SunOS / SVR4 style shared libraries only.)
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
153
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
154 Jim Fulton's ``abstract object interface'' has been incorporated into
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
155 the run-time API. For more detailes, read the files
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
156 "Include/abstract.h" and "Objects/abstract.c".
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
157
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
158 The Macintosh version is much more robust now.
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
159
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
160 Numerous things I have forgotten or that are so obscure no-one will
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
161 notice them anyway :-)
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
162
a3b09a71162b Moved 1.3 news to HISTORY; put some 1.4 news in NEWS
Guido van Rossum <guido@python.org>
parents: 3179
diff changeset
163
2067
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
164 ===================================
3179
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
165 ==> Release 1.2 (13 April 1995) <==
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
166 ===================================
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
167
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
168 - Changes to Misc/python-mode.el:
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
169 - Wrapping and indentation within triple quote strings should work
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
170 properly now.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
171 - `Standard' bug reporting mechanism (use C-c C-b)
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
172 - py-mark-block was moved to C-c C-m
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
173 - C-c C-v shows you the python-mode version
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
174 - a basic python-font-lock-keywords has been added for Emacs 19
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
175 font-lock colorizations.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
176 - proper interaction with pending-del and del-sel modes.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
177 - New py-electric-colon (:) command for improved outdenting. Also
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
178 py-indent-line (TAB) should handle outdented lines better.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
179 - New commands py-outdent-left (C-c C-l) and py-indent-right (C-c C-r)
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
180
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
181 - The Library Reference has been restructured, and many new and
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
182 existing modules are now documented, in particular the debugger and
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
183 the profiler, as well as the persistency and the WWW/Internet support
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
184 modules.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
185
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
186 - All known bugs have been fixed. For example the pow(2,2,3L) bug on
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
187 Linux has been fixed. Also the re-entrancy problems with __del__ have
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
188 been fixed.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
189
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
190 - All known memory leaks have been fixed.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
191
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
192 - Phase 2 of the Great Renaming has been executed. The header files
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
193 now use the new names (PyObject instead of object, etc.). The linker
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
194 also sees the new names. Most source files still use the old names,
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
195 by virtue of the rename2.h header file. If you include Python.h, you
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
196 only see the new names. Dynamically linked modules have to be
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
197 recompiled. (Phase 3, fixing the rest of the sources, will be
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
198 executed gradually with the release later versions.)
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
199
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
200 - The hooks for implementing "safe-python" (better called "restricted
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
201 execution") are in place. Specifically, the import statement is
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
202 implemented by calling the built-in function __import__, and the
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
203 built-in names used in a particular scope are taken from the
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
204 dictionary __builtins__ in that scope's global dictionary. See also
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
205 the new (unsupported, undocumented) module rexec.py.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
206
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
207 - The import statement now supports the syntax "import a.b.c" and
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
208 "from a.b.c import name". No officially supported implementation
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
209 exists, but one can be prototyped by replacing the built-in __import__
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
210 function. A proposal by Ken Manheimer is provided as newimp.py.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
211
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
212 - All machinery used by the import statement (or the built-in
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
213 __import__ function) is now exposed through the new built-in module
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
214 "imp" (see the library reference manual). All dynamic loading
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
215 machinery is moved to the new file importdl.c.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
216
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
217 - Persistent storage is supported through the use of the modules
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
218 "pickle" and "shelve" (implemented in Python). There's also a "copy"
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
219 module implementing deepcopy and normal (shallow) copy operations.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
220 See the library reference manual.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
221
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
222 - Documentation strings for many objects types are accessible through
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
223 the __doc__ attribute. Modules, classes and functions support special
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
224 syntax to initialize the __doc__ attribute: if the first statement
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
225 consists of just a string literal, that string literal becomes the
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
226 value of the __doc__ attribute. The default __doc__ attribute is
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
227 None. Documentation strings are also supported for built-in
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
228 functions, types and modules; however this feature hasn't been widely
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
229 used yet. See the 'new' module for an example. (Basically, the type
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
230 object's tp_doc field contains the doc string for the type, and the
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
231 4th member of the methodlist structure contains the doc string for the
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
232 method.)
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
233
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
234 - The __coerce__ and __cmp__ methods for user-defined classes once
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
235 again work as expected. As an example, there's a new standard class
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
236 Complex in the library.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
237
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
238 - The functions posix.popen() and posix.fdopen() now have an optional
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
239 third argument to specify the buffer size, and default their second
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
240 (mode) argument to 'r' -- in analogy to the builtin open() function.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
241 The same applies to posixfile.open() and the socket method makefile().
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
242
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
243 - The thread.exit_thread() function now raises SystemExit so that
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
244 'finally' clauses are honored and a memory leak is plugged.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
245
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
246 - Improved X11 and Motif support, by Sjoerd Mullender. This extension
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
247 is being maintained and distributed separately.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
248
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
249 - Improved support for the Apple Macintosh, in part by Jack Jansen,
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
250 e.g. interfaces to (a few) resource mananger functions, get/set file
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
251 type and creator, gestalt, sound manager, speech manager, MacTCP, comm
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
252 toolbox, and the think C console library. This is being maintained
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
253 and distributed separately.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
254
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
255 - Improved version for Windows NT, by Mark Hammond. This is being
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
256 maintained and distributed separately.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
257
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
258 - Used autoconf 2.0 to generate the configure script. Adapted
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
259 configure.in to use the new features in autoconf 2.0.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
260
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
261 - It now builds on the NeXT without intervention, even on the 3.3
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
262 Sparc pre-release.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
263
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
264 - Characters passed to isspace() and friends are masked to nonnegative
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
265 values.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
266
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
267 - Correctly compute pow(-3.0, 3).
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
268
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
269 - Fix portability problems with getopt (configure now checks for a
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
270 non-GNU getopt).
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
271
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
272 - Don't add frozenmain.o to libPython.a.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
273
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
274 - Exceptions can now be classes. ALl built-in exceptions are still
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
275 string objects, but this will change in the future.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
276
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
277 - The socket module exports a long list of socket related symbols.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
278 (More built-in modules will export their symbolic constants instead of
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
279 relying on a separately generated Python module.)
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
280
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
281 - When a module object is deleted, it clears out its own dictionary.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
282 This fixes a circularity in the references between functions and
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
283 their global dictionary.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
284
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
285 - Changed the error handling by [new]getargs() e.g. for "O&".
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
286
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
287 - Dynamic loading of modules using shared libraries is supported for
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
288 several new platforms.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
289
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
290 - Support "O&", "[...]" and "{...}" in mkvalue().
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
291
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
292 - Extension to findmethod(): findmethodinchain() (where a chain is a
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
293 linked list of methodlist arrays). The calling interface for
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
294 findmethod() has changed: it now gets a pointer to the (static!)
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
295 methodlist structure rather than just to the function name -- this
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
296 saves copying flags etc. into the (short-lived) method object.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
297
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
298 - The callable() function is now public.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
299
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
300 - Object types can define a few new operations by setting function
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
301 pointers in the type object structure: tp_call defines how an object
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
302 is called, and tp_str defines how an object's str() is computed.
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
303
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
304
2a4d130373db added 1.2 news
Guido van Rossum <guido@python.org>
parents: 2067
diff changeset
305 ===================================
2067
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
306 ==> Release 1.1.1 (10 Nov 1994) <==
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
307 ===================================
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
308
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
309 This is a pure bugfix release again. See the ChangeLog file for details.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
310
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
311 One exception: a few new features were added to tkinter.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
312
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
313
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
314 =================================
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
315 ==> Release 1.1 (11 Oct 1994) <==
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
316 =================================
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
317
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
318 This release adds several new features, improved configuration and
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
319 portability, and fixes more bugs than I can list here (including some
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
320 memory leaks).
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
321
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
322 The source compiles and runs out of the box on more platforms than
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
323 ever -- including Windows NT. Makefiles or projects for a variety of
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
324 non-UNIX platforms are provided.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
325
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
326 APOLOGY: some new features are badly documented or not at all. I had
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
327 the choice -- postpone the new release indefinitely, or release it
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
328 now, with working code but some undocumented areas. The problem with
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
329 postponing the release is that people continue to suffer from existing
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
330 bugs, and send me patches based on the previous release -- which I
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
331 can't apply directly because my own source has changed. Also, some
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
332 new modules (like signal) have been ready for release for quite some
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
333 time, and people are anxiously waiting for them. In the case of
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
334 signal, the interface is simple enough to figure out without
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
335 documentation (if you're anxious enough :-). In this case it was not
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
336 simple to release the module on its own, since it relies on many small
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
337 patches elsewhere in the source.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
338
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
339 For most new Python modules, the source code contains comments that
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
340 explain how to use them. Documentation for the Tk interface, written
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
341 by Matt Conway, is available as tkinter-doc.tar.gz from the Python
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
342 home and mirror ftp sites (see Misc/FAQ for ftp addresses). For the
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
343 new operator overloading facilities, have a look at Demo/classes:
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
344 Complex.py and Rat.py show how to implement a numeric type without and
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
345 with __coerce__ method. Also have a look at the end of the Tutorial
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
346 document (Doc/tut.tex). If you're still confused: use the newsgroup
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
347 or mailing list.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
348
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
349
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
350 New language features:
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
351
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
352 - More flexible operator overloading for user-defined classes
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
353 (INCOMPATIBLE WITH PREVIOUS VERSIONS!) See end of tutorial.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
354
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
355 - Classes can define methods named __getattr__, __setattr__ and
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
356 __delattr__ to trap attribute accesses. See end of tutorial.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
357
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
358 - Classes can define method __call__ so instances can be called
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
359 directly. See end of tutorial.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
360
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
361
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
362 New support facilities:
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
363
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
364 - The Makefiles (for the base interpreter as well as for extensions)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
365 now support creating dynamically loadable modules if the platform
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
366 supports shared libraries.
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
367
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
368 - Passing the interpreter a .pyc file as script argument will execute
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
369 the code in that file. (On the Mac such files can be double-clicked!)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
370
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
371 - New Freeze script, to create independently distributable "binaries"
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
372 of Python programs -- look in Demo/freeze
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
373
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
374 - Improved h2py script (in Demo/scripts) follows #includes and
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
375 supports macros with one argument
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
376
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
377 - New module compileall generates .pyc files for all modules in a
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
378 directory (tree) without also executing them
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
379
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
380 - Threads should work on more platforms
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
381
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
382
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
383 New built-in modules:
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
384
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
385 - tkinter (support for Tcl's Tk widget set) is now part of the base
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
386 distribution
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
387
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
388 - signal allows catching or ignoring UNIX signals (unfortunately still
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
389 undocumented -- any taker?)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
390
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
391 - termios provides portable access to POSIX tty settings
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
392
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
393 - curses provides an interface to the System V curses library
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
394
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
395 - syslog provides an interface to the (BSD?) syslog daemon
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
396
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
397 - 'new' provides interfaces to create new built-in object types
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
398 (e.g. modules and functions)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
399
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
400 - sybase provides an interface to SYBASE database
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
401
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
402
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
403 New/obsolete built-in methods:
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
404
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
405 - callable(x) tests whether x can be called
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
406
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
407 - sockets now have a setblocking() method
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
408
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
409 - sockets no longer have an allowbroadcast() method
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
410
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
411 - socket methods send() and sendto() return byte count
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
412
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
413
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
414 New standard library modules:
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
415
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
416 - types.py defines standard names for built-in types, e.g. StringType
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
417
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
418 - urlparse.py parses URLs according to the latest Internet draft
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
419
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
420 - uu.py does uuencode/uudecode (not the fastest in the world, but
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
421 quicker than installing uuencode on a non-UNIX machine :-)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
422
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
423 - New, faster and more powerful profile module.py
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
424
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
425 - mhlib.py provides interface to MH folders and messages
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
426
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
427
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
428 New facilities for extension writers (unfortunately still
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
429 undocumented):
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
430
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
431 - newgetargs() supports optional arguments and improved error messages
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
432
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
433 - O!, O& O? formats for getargs allow more versatile type checking of
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
434 non-standard types
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
435
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
436 - can register pending asynchronous callback, to be called the next
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
437 time the Python VM begins a new instruction (Py_AddPendingCall)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
438
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
439 - can register cleanup routines to be called when Python exits
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
440 (Py_AtExit)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
441
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
442 - makesetup script understands C++ files in Setup file (use file.C
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
443 or file.cc)
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
444
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
445 - Make variable OPT is passed on to sub-Makefiles
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
446
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
447 - An init<module>() routine may signal an error by not entering
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
448 the module in the module table and raising an exception instead
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
449
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
450 - For long module names, instead of foobarbletchmodule.c you can
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
451 use foobarbletch.c
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
452
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
453 - getintvalue() and getfloatvalue() try to convert any object
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
454 instead of requiring an "intobject" or "floatobject"
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
455
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
456 - All the [new]getargs() formats that retrieve an integer value
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
457 will now also work if a float is passed
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
458
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
459 - C function listtuple() converts list to tuple, fast
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
460
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
461 - You should now call sigcheck() instead of intrcheck();
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
462 sigcheck() also sets an exception when it returns nonzero
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
463
1b99451fa143 Moved 1.1 and 1.1.1 news here
Guido van Rossum <guido@python.org>
parents: 1948
diff changeset
464
1948
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
465 ====================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
466 ==> Release 1.0.3 (14 July 1994) <==
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
467 ====================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
468
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
469 This release consists entirely of bug fixes to the C sources; see the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
470 head of ../ChangeLog for a complete list. Most important bugs fixed:
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
471
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
472 - Sometimes the format operator (string%expr) would drop the last
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
473 character of the format string
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
474
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
475 - Tokenizer looped when last line did not end in \n
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
476
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
477 - Bug when triple-quoted string ended in quote plus newline
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
478
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
479 - Typo in socketmodule (listen) (== instead of =)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
480
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
481 - typing vars() at the >>> prompt would cause recursive output
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
482
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
483
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
484 ==================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
485 ==> Release 1.0.2 (4 May 1994) <==
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
486 ==================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
487
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
488 Overview of the most visible changes. Bug fixes are not listed. See
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
489 also ChangeLog.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
490
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
491 Tokens
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
492 ------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
493
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
494 * String literals follow Standard C rules: they may be continued on
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
495 the next line using a backslash; adjacent literals are concatenated
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
496 at compile time.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
497
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
498 * A new kind of string literals, surrounded by triple quotes (""" or
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
499 '''), can be continued on the next line without a backslash.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
500
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
501 Syntax
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
502 ------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
503
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
504 * Function arguments may have a default value, e.g. def f(a, b=1);
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
505 defaults are evaluated at function definition time. This also applies
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
506 to lambda.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
507
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
508 * The try-except statement has an optional else clause, which is
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
509 executed when no exception occurs in the try clause.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
510
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
511 Interpreter
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
512 -----------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
513
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
514 * The result of a statement-level expression is no longer printed,
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
515 except_ for expressions entered interactively. Consequently, the -k
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
516 command line option is gone.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
517
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
518 * The result of the last printed interactive expression is assigned to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
519 the variable '_'.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
520
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
521 * Access to implicit global variables has been speeded up by removing
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
522 an always-failing dictionary lookup in the dictionary of local
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
523 variables (mod suggested by Steve Makewski and Tim Peters).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
524
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
525 * There is a new command line option, -u, to force stdout and stderr
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
526 to be unbuffered.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
527
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
528 * Incorporated Steve Majewski's mods to import.c for dynamic loading
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
529 under AIX.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
530
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
531 * Fewer chances of dumping core when trying to reload or re-import
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
532 static built-in, dynamically loaded built-in, or frozen modules.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
533
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
534 * Loops over sequences now don't ask for the sequence's length when
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
535 they start, but try to access items 0, 1, 2, and so on until they hit
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
536 an IndexError. This makes it possible to create classes that generate
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
537 infinite or indefinite sequences a la Steve Majewski. This affects
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
538 for loops, the (not) in operator, and the built-in functions filter(),
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
539 map(), max(), min(), reduce().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
540
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
541 Changed Built-in operations
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
542 ---------------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
543
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
544 * The '%' operator on strings (printf-style formatting) supports a new
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
545 feature (adapted from a patch by Donald Beaudry) to allow
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
546 '%(<key>)<format>' % {...} to take values from a dictionary by name
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
547 instead of from a tuple by position (see also the new function
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
548 vars()).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
549
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
550 * The '%s' formatting operator is changed to accept any type and
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
551 convert it to a string using str().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
552
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
553 * Dictionaries with more than 20,000 entries can now be created
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
554 (thanks to Steve Kirsch).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
555
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
556 New Built-in Functions
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
557 ----------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
558
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
559 * vars() returns a dictionary containing the local variables; vars(m)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
560 returns a dictionary containing the variables of module m. Note:
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
561 dir(x) is now equivalent to vars(x).keys().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
562
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
563 Changed Built-in Functions
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
564 --------------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
565
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
566 * open() has an optional third argument to specify the buffer size: 0
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
567 for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
568 for default.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
569
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
570 * open()'s second argument is now optional; it defaults to "r".
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
571
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
572 * apply() now checks that its second argument is indeed a tuple.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
573
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
574 New Built-in Modules
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
575 --------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
576
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
577 Changed Built-in Modules
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
578 ------------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
579
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
580 The thread module no longer supports exit_prog().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
581
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
582 New Python Modules
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
583 ------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
584
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
585 * Module addpack contains a standard interface to modify sys.path to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
586 find optional packages (groups of related modules).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
587
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
588 * Module urllib contains a number of functions to access
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
589 World-Wide-Web files specified by their URL.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
590
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
591 * Module httplib implements the client side of the HTTP protocol used
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
592 by World-Wide-Web servers.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
593
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
594 * Module gopherlib implements the client side of the Gopher protocol.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
595
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
596 * Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
597 style mailbox files.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
598
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
599 * Module random contains various random distributions, e.g. gauss().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
600
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
601 * Module lockfile locks and unlocks open files using fcntl (inspired
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
602 by a similar module by Andy Bensky).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
603
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
604 * Module ntpath (by Jaap Vermeulen) implements path operations for
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
605 Windows/NT.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
606
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
607 * Module test_thread (in Lib/test) contains a small test set for the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
608 thread module.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
609
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
610 Changed Python Modules
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
611 ----------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
612
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
613 * The string module's expandvars() function is now documented and is
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
614 implemented in Python (using regular expressions) instead of forking
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
615 off a shell process.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
616
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
617 * Module rfc822 now supports accessing the header fields using the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
618 mapping/dictionary interface, e.g. h['subject'].
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
619
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
620 * Module pdb now makes it possible to set a break on a function
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
621 (syntax: break <expression>, where <expression> yields a function
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
622 object).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
623
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
624 Changed Demos
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
625 -------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
626
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
627 * The Demo/scripts/freeze.py script is working again (thanks to Jaap
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
628 Vermeulen).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
629
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
630 New Demos
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
631 ---------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
632
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
633 * Demo/threads/Generator.py is a proposed interface for restartable
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
634 functions a la Tim Peters.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
635
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
636 * Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
637 directory full of HTML pages which between them contain links to all
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
638 the newsgroups available on your server.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
639
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
640 * Demo/dns contains a DNS (Domain Name Server) client.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
641
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
642 * Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
643 nice enhanced Python shell!!!).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
644
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
645 * Demo/turing contains a Turing machine by Amrit Prem.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
646
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
647 Documentation
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
648 -------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
649
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
650 * Documented new language features mentioned above (but not all new
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
651 modules).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
652
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
653 * Added a chapter to the Tutorial describing recent additions to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
654 Python.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
655
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
656 * Clarified some sentences in the reference manual,
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
657 e.g. break/continue, local/global scope, slice assignment.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
658
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
659 Source Structure
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
660 ----------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
661
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
662 * Moved Include/tokenizer.h to Parser/tokenizer.h.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
663
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
664 * Added Python/getopt.c for systems that don't have it.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
665
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
666 Emacs mode
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
667 ----------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
668
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
669 * Indentation of continuated lines is done more intelligently;
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
670 consequently the variable py-continuation-offset is gone.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
671
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
672 ========================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
673 ==> Release 1.0.1 (15 February 1994) <==
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
674 ========================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
675
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
676 * Many portability fixes should make it painless to build Python on
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
677 several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
678
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
679 * Fixed test for <stdarg.h> -- this broke on some platforms.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
680
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
681 * Fixed test for shared library dynalic loading -- this broke on SunOS
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
682 4.x using the GNU loader.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
683
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
684 * Changed order and number of SVR4 networking libraries (it is now
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
685 -lsocket -linet -lnsl, if these libraries exist).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
686
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
687 * Installing the build intermediate stages with "make libainstall" now
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
688 also installs config.c.in, Setup and makesetup, which are used by the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
689 new Extensions mechanism.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
690
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
691 * Improved README file contains more hints and new troubleshooting
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
692 section.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
693
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
694 * The built-in module strop now defines fast versions of three more
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
695 functions of the standard string module: atoi(), atol() and atof().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
696 The strop versions of atoi() and atol() support an optional second
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
697 argument to specify the base (default 10). NOTE: you don't have to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
698 explicitly import strop to use the faster versions -- the string
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
699 module contains code to let versions from stop override the default
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
700 versions.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
701
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
702 * There is now a working Lib/dospath.py for those who use Python under
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
703 DOS (or Windows). Thanks, Jaap!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
704
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
705 * There is now a working Modules/dosmodule.c for DOS (or Windows)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
706 system calls.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
707
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
708 * Lib.os.py has been reorganized (making it ready for more operating
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
709 systems).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
710
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
711 * Lib/ospath.py is now obsolete (use os.path instead).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
712
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
713 * Many fixes to the tutorial to make it match Python 1.0. Thanks,
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
714 Tim!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
715
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
716 * Fixed Doc/Makefile, Doc/README and various scripts there.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
717
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
718 * Added missing description of fdopen to Doc/libposix.tex.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
719
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
720 * Made cleanup() global, for the benefit of embedded applications.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
721
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
722 * Added parsing of addresses and dates to Lib/rfc822.py.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
723
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
724 * Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
725 them usable at all.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
726
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
727 * New module Lib/wave.py reads RIFF (*.wav) audio files.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
728
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
729 * Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
730 belongs.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
731
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
732 * New options and comments for Modules/makesetup (used by new
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
733 Extension mechanism).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
734
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
735 * Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
736 and elsewhere.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
737
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
738 * Fixed coredump in filter(None, 'abcdefg').
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
739
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
740
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
741 =======================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
742 ==> Release 1.0.0 (26 January 1994) <==
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
743 =======================================
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
744
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
745 As is traditional, so many things have changed that I can't pretend to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
746 be complete in these release notes, but I'll try anyway :-)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
747
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
748 Note that the very last section is labeled "remaining bugs".
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
749
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
750
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
751 Source organization and build process
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
752 -------------------------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
753
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
754 * The sources have finally been split: instead of a single src
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
755 subdirectory there are now separate directories Include, Parser,
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
756 Grammar, Objects, Python and Modules. Other directories also start
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
757 with a capital letter: Misc, Doc, Lib, Demo.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
758
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
759 * A few extensions (notably Amoeba and X support) have been moved to a
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
760 separate subtree Extensions, which is no longer in the core
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
761 distribution, but separately ftp'able as extensions.tar.Z. (The
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
762 distribution contains a placeholder Ext-dummy with a description of
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
763 the Extensions subtree as well as the most recent versions of the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
764 scripts used there.)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
765
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
766 * A few large specialized demos (SGI video and www) have been
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
767 moved to a separate subdirectory Demo2, which is no longer in the core
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
768 distribution, but separately ftp'able as demo2.tar.Z.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
769
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
770 * Parts of the standard library have been moved to subdirectories:
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
771 there are now standard subdirectories stdwin, test, sgi and sun4.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
772
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
773 * The configuration process has radically changed: I now use GNU
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
774 autoconf. This makes it much easier to build on new Unix flavors, as
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
775 well as fully supporting VPATH (if your Make has it). The scripts
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
776 Configure.py and Addmodule.sh are no longer needed. Many source files
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
777 have been adapted in order to work with the symbols that the configure
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
778 script generated by autoconf defines (or not); the resulting source is
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
779 much more portable to different C compilers and operating systems,
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
780 even non Unix systems (a Mac port was done in an afternoon). See the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
781 toplevel README file for a description of the new build process.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
782
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
783 * GNU readline (a slightly newer version) is now a subdirectory of the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
784 Python toplevel. It is still not automatically configured (being
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
785 totally autoconf-unaware :-). One problem has been solved: typing
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
786 Control-C to a readline prompt will now work. The distribution no
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
787 longer contains a "super-level" directory (above the python toplevel
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
788 directory), and dl, dl-dld and GNU dld are no longer part of the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
789 Python distribution (you can still ftp them from
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
790 ftp.cwi.nl:/pub/dynload).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
791
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
792 * The DOS functions have been taken out of posixmodule.c and moved
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
793 into a separate file dosmodule.c.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
794
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
795 * There's now a separate file version.c which contains nothing but
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
796 the version number.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
797
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
798 * The actual main program is now contained in config.c (unless NO_MAIN
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
799 is defined); pythonmain.c now contains a function realmain() which is
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
800 called from config.c's main().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
801
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
802 * All files needed to use the built-in module md5 are now contained in
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
803 the distribution. The module has been cleaned up considerably.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
804
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
805
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
806 Documentation
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
807 -------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
808
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
809 * The library manual has been split into many more small latex files,
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
810 so it is easier to edit Doc/lib.tex file to create a custom library
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
811 manual, describing only those modules supported on your system. (This
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
812 is not automated though.)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
813
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
814 * A fourth manual has been added, titled "Extending and Embedding the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
815 Python Interpreter" (Doc/ext.tex), which collects information about
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
816 the interpreter which was previously spread over several files in the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
817 misc subdirectory.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
818
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
819 * The entire documentation is now also available on-line for those who
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
820 have a WWW browser (e.g. NCSA Mosaic). Point your browser to the URL
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
821 "http://www.cwi.nl/~guido/Python.html".
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
822
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
823
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
824 Syntax
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
825 ------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
826
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
827 * Strings may now be enclosed in double quotes as well as in single
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
828 quotes. There is no difference in interpretation. The repr() of
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
829 string objects will use double quotes if the string contains a single
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
830 quote and no double quotes. Thanks to Amrit Prem for these changes!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
831
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
832 * There is a new keyword 'exec'. This replaces the exec() built-in
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
833 function. If a function contains an exec statement, local variable
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
834 optimization is not performed for that particular function, thus
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
835 making assignment to local variables in exec statements less
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
836 confusing. (As a consequence, os.exec and python.exec have been
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
837 renamed to execv.)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
838
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
839 * There is a new keyword 'lambda'. An expression of the form
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
840
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
841 lambda <parameters> : <expression>
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
842
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
843 yields an anonymous function. This is really only syntactic sugar;
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
844 you can just as well define a local function using
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
845
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
846 def some_temporary_name(<parameters>): return <expression>
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
847
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
848 Lambda expressions are particularly useful in combination with map(),
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
849 filter() and reduce(), described below. Thanks to Amrit Prem for
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
850 submitting this code (as well as map(), filter(), reduce() and
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
851 xrange())!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
852
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
853
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
854 Built-in functions
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
855 ------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
856
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
857 * The built-in module containing the built-in functions is called
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
858 __builtin__ instead of builtin.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
859
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
860 * New built-in functions map(), filter() and reduce() perform standard
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
861 functional programming operations (though not lazily):
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
862
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
863 - map(f, seq) returns a new sequence whose items are the items from
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
864 seq with f() applied to them.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
865
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
866 - filter(f, seq) returns a subsequence of seq consisting of those
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
867 items for which f() is true.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
868
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
869 - reduce(f, seq, initial) returns a value computed as follows:
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
870 acc = initial
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
871 for item in seq: acc = f(acc, item)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
872 return acc
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
873
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
874 * New function xrange() creates a "range object". Its arguments are
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
875 the same as those of range(), and when used in a for loop a range
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
876 objects also behaves identical. The advantage of xrange() over
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
877 range() is that its representation (if the range contains many
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
878 elements) is much more compact than that of range(). The disadvantage
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
879 is that the result cannot be used to initialize a list object or for
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
880 the "Python idiom" [RED, GREEN, BLUE] = range(3). On some modern
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
881 architectures, benchmarks have shown that "for i in range(...): ..."
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
882 actually executes *faster* than "for i in xrange(...): ...", but on
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
883 memory starved machines like PCs running DOS range(100000) may be just
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
884 too big to be represented at all...
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
885
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
886 * Built-in function exec() has been replaced by the exec statement --
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
887 see above.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
888
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
889
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
890 The interpreter
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
891 ---------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
892
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
893 * Syntax errors are now not printed to stderr by the parser, but
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
894 rather the offending line and other relevant information are packed up
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
895 in the SyntaxError exception argument. When the main loop catches a
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
896 SyntaxError exception it will print the error in the same format as
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
897 previously, but at the proper position in the stack traceback.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
898
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
899 * You can now set a maximum to the number of traceback entries
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
900 printed by assigning to sys.tracebacklimit. The default is 1000.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
901
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
902 * The version number in .pyc files has changed yet again.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
903
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
904 * It is now possible to have a .pyc file without a corresponding .py
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
905 file. (Warning: this may break existing installations if you have an
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
906 old .pyc file lingering around somewhere on your module search path
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
907 without a corresponding .py file, when there is a .py file for a
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
908 module of the same name further down the path -- the new interpreter
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
909 will find the first .pyc file and complain about it, while the old
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
910 interpreter would ignore it and use the .py file further down.)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
911
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
912 * The list sys.builtin_module_names is now sorted and also contains
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
913 the names of a few hardwired built-in modules (sys, __main__ and
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
914 __builtin__).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
915
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
916 * A module can now find its own name by accessing the global variable
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
917 __name__. Assigning to this variable essentially renames the module
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
918 (it should also be stored under a different key in sys.modules).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
919 A neat hack follows from this: a module that wants to execute a main
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
920 program when called as a script no longer needs to compare
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
921 sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
922
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
923 * When an object is printed by the print statement, its implementation
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
924 of str() is used. This means that classes can define __str__(self) to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
925 direct how their instances are printed. This is different from
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
926 __repr__(self), which should define an unambigous string
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
927 representation of the instance. (If __str__() is not defined, it
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
928 defaults to __repr__().)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
929
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
930 * Functions and code objects can now be compared meaningfully.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
931
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
932 * On systems supporting SunOS or SVR4 style shared libraries, dynamic
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
933 loading of modules using shared libraries is automatically configured.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
934 Thanks to Bill Jansen and Denis Severson for contributing this change!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
935
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
936
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
937 Built-in objects
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
938 ----------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
939
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
940 * File objects have acquired a new method writelines() which is the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
941 reverse of readlines(). (It does not actually write lines, just a
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
942 list of strings, but the symmetry makes the choice of name OK.)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
943
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
944
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
945 Built-in modules
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
946 ----------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
947
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
948 * Socket objects no longer support the avail() method. Use the select
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
949 module instead, or use this function to replace it:
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
950
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
951 def avail(f):
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
952 import select
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
953 return f in select.select([f], [], [], 0)[0]
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
954
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
955 * Initialization of stdwin is done differently. It actually modifies
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
956 sys.argv (taking out the options the X version of stdwin recognizes)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
957 the first time it is imported.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
958
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
959 * A new built-in module parser provides a rudimentary interface to the
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
960 python parser. Corresponding standard library modules token and symbol
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
961 defines the numeric values of tokens and non-terminal symbols.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
962
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
963 * The posix module has aquired new functions setuid(), setgid(),
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
964 execve(), and exec() has been renamed to execv().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
965
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
966 * The array module is extended with 8-byte object swaps, the 'i'
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
967 format character, and a reverse() method. The read() and write()
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
968 methods are renamed to fromfile() and tofile().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
969
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
970 * The rotor module has freed of portability bugs. This introduces a
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
971 backward compatibility problem: strings encoded with the old rotor
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
972 module can't be decoded by the new version.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
973
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
974 * For select.select(), a timeout (4th) argument of None means the same
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
975 as leaving the timeout argument out.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
976
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
977 * Module strop (and hence standard library module string) has aquired
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
978 a new function: rindex(). Thanks to Amrit Prem!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
979
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
980 * Module regex defines a new function symcomp() which uses an extended
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
981 regular expression syntax: parenthesized subexpressions may be labeled
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
982 using the form "\(<labelname>...\)", and the group() method can return
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
983 sub-expressions by name. Thanks to Tracy Tims for these changes!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
984
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
985 * Multiple threads are now supported on Solaris 2. Thanks to Sjoerd
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
986 Mullender!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
987
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
988
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
989 Standard library modules
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
990 ------------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
991
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
992 * The library is now split in several subdirectories: all stuff using
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
993 stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
994 is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
995 test modules are in Lib/test. The default module search path will
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
996 include all relevant subdirectories by default.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
997
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
998 * Module os now knows about trying to import dos. It defines
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
999 functions execl(), execle(), execlp() and execvp().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1000
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1001 * New module dospath (should be attacked by a DOS hacker though).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1002
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1003 * All modules defining classes now define __init__() constructors
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1004 instead of init() methods. THIS IS AN INCOMPATIBLE CHANGE!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1005
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1006 * Some minor changes and bugfixes module ftplib (mostly Steve
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1007 Majewski's suggestions); the debug() method is renamed to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1008 set_debuglevel().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1009
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1010 * Some new test modules (not run automatically by testall though):
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1011 test_audioop, test_md5, test_rgbimg, test_select.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1012
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1013 * Module string now defines rindex() and rfind() in analogy of index()
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1014 and find(). It also defines atof() and atol() (and corresponding
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1015 exceptions) in analogy to atoi().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1016
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1017 * Added help() functions to modules profile and pdb.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1018
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1019 * The wdb debugger (now in Lib/stdwin) now shows class or instance
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1020 variables on a double click. Thanks to Sjoerd Mullender!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1021
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1022 * The (undocumented) module lambda has gone -- you couldn't import it
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1023 any more, and it was basically more a demo than a library module...
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1024
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1025
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1026 Multimedia extensions
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1027 ---------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1028
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1029 * The optional built-in modules audioop and imageop are now standard
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1030 parts of the interpreter. Thanks to Sjoerd Mullender and Jack Jansen
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1031 for contributing this code!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1032
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1033 * There's a new operation in audioop: minmax().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1034
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1035 * There's a new built-in module called rgbimg which supports portable
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1036 efficient reading of SGI RCG image files. Thanks also to Paul
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1037 Haeberli for the original code! (Who will contribute a GIF reader?)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1038
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1039 * The module aifc is gone -- you should now always use aifc, which has
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1040 received a facelift.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1041
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1042 * There's a new module sunau., for reading Sun (and NeXT) audio files.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1043
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1044 * There's a new module audiodev which provides a uniform interface to
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1045 (SGI Indigo and Sun Sparc) audio hardware.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1046
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1047 * There's a new module sndhdr which recognizes various sound files by
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1048 looking in their header and checking for various magic words.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1049
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1050
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1051 Optimizations
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1052 -------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1053
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1054 * Most optimizations below can be configured by compile-time flags.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1055 Thanks to Sjoerd Mullender for submitting these optimizations!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1056
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1057 * Small integers (default -1..99) are shared -- i.e. if two different
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1058 functions compute the same value it is possible (but not
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1059 guaranteed!!!) that they return the same *object*. Python programs
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1060 can detect this but should *never* rely on it.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1061
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1062 * Empty tuples (which all compare equal) are shared in the same
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1063 manner.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1064
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1065 * Tuples of size up to 20 (default) are put in separate free lists
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1066 when deallocated.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1067
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1068 * There is a compile-time option to cache a string's hash function,
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1069 but this appeared to have a negligeable effect, and as it costs 4
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1070 bytes per string it is disabled by default.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1071
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1072
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1073 Embedding Python
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1074 ----------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1075
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1076 * The initialization interface has been simplified somewhat. You now
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1077 only call "initall()" to initialize the interpreter.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1078
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1079 * The previously announced renaming of externally visible identifiers
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1080 has not been carried out. It will happen in a later release. Sorry.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1081
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1082
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1083 Miscellaneous bugs that have been fixed
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1084 ---------------------------------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1085
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1086 * All known portability bugs.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1087
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1088 * Version 0.9.9 dumped core in <listobject>.sort() which has been
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1089 fixed. Thanks to Jaap Vermeulen for fixing this and posting the fix
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1090 on the mailing list while I was away!
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1091
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1092 * Core dump on a format string ending in '%', e.g. in the expression
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1093 '%' % None.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1094
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1095 * The array module yielded a bogus result for concatenation (a+b would
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1096 yield a+a).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1097
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1098 * Some serious memory leaks in strop.split() and strop.splitfields().
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1099
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1100 * Several problems with the nis module.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1101
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1102 * Subtle problem when copying a class method from another class
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1103 through assignment (the method could not be called).
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1104
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1105
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1106 Remaining bugs
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1107 --------------
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1108
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1109 * One problem with 64-bit machines remains -- since .pyc files are
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1110 portable and use only 4 bytes to represent an integer object, 64-bit
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1111 integer literals are silently truncated when written into a .pyc file.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1112 Work-around: use eval('123456789101112').
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1113
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1114 * The freeze script doesn't work any more. A new and more portable
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1115 one can probably be cooked up using tricks from Extensions/mkext.py.
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1116
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1117 * The dos support hasn't been tested yet. (Really Soon Now we should
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1118 have a PC with a working C compiler!)
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1119
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1120
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1121 ===================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1122 ==> Release 0.9.9 (29 Jul 1993) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1123 ===================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1124
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1125 I *believe* these are the main user-visible changes in this release,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1126 but there may be others. SGI users may scan the {src,lib}/ChangeLog
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1127 files for improvements of some SGI specific modules, e.g. aifc and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1128 cl. Developers of extension modules should also read src/ChangeLog.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1129
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1130
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1131 Naming of C symbols used by the Python interpreter
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1132 --------------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1133
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1134 * This is the last release using the current naming conventions. New
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1135 naming conventions are explained in the file misc/NAMING.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1136 Summarizing, all externally visible symbols get (at least) a "Py"
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1137 prefix, and most functions are renamed to the standard form
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1138 PyModule_FunctionName.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1139
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1140 * Writers of extensions are urged to start using the new naming
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1141 conventions. The next release will use the new naming conventions
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1142 throughout (it will also have a different source directory
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1143 structure).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1144
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1145 * As a result of the preliminary work for the great renaming, many
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1146 functions that were accidentally global have been made static.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1147
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1148
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1149 BETA X11 support
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1150 ----------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1151
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1152 * There are now modules interfacing to the X11 Toolkit Intrinsics, the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1153 Athena widgets, and the Motif 1.1 widget set. These are not yet
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1154 documented except through the examples and README file in the demo/x11
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1155 directory. It is expected that this interface will be replaced by a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1156 more powerful and correct one in the future, which may or may not be
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1157 backward compatible. In other words, this part of the code is at most
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1158 BETA level software! (Note: the rest of Python is rock solid as ever!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1159
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1160 * I understand that the above may be a bit of a disappointment,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1161 however my current schedule does not allow me to change this situation
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1162 before putting the release out of the door. By releasing it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1163 undocumented and buggy, at least some of the (working!) demo programs,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1164 like itr (my Internet Talk Radio browser) become available to a larger
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1165 audience.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1166
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1167 * There are also modules interfacing to SGI's "Glx" widget (a GL
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1168 window wrapped in a widget) and to NCSA's "HTML" widget (which can
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1169 format HyperText Markup Language, the document format used by the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1170 World Wide Web).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1171
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1172 * I've experienced some problems when building the X11 support. In
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1173 particular, the Xm and Xaw widget sets don't go together, and it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1174 appears that using X11R5 is better than using X11R4. Also the threads
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1175 module and its link time options may spoil things. My own strategy is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1176 to build two Python binaries: one for use with X11 and one without
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1177 it, which can contain a richer set of built-in modules. Don't even
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1178 *think* of loading the X11 modules dynamically...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1179
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1180
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1181 Environmental changes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1182 ---------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1183
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1184 * Compiled files (*.pyc files) created by this Python version are
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1185 incompatible with those created by the previous version. Both
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1186 versions detect this and silently create a correct version, but it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1187 means that it is not a good idea to use the same library directory for
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1188 an old and a new interpreter, since they will start to "fight" over
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1189 the *.pyc files...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1190
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1191 * When a stack trace is printed, the exception is printed last instead
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1192 of first. This means that if the beginning of the stack trace
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1193 scrolled out of your window you can still see what exception caused
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1194 it.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1195
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1196 * Sometimes interrupting a Python operation does not work because it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1197 hangs in a blocking system call. You can now kill the interpreter by
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1198 interrupting it three times. The second time you interrupt it, a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1199 message will be printed telling you that the third interrupt will kill
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1200 the interpreter. The "sys.exitfunc" feature still makes limited
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1201 clean-up possible in this case.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1202
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1203
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1204 Changes to the command line interface
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1205 -------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1206
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1207 * The python usage message is now much more informative.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1208
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1209 * New option -i enters interactive mode after executing a script --
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1210 useful for debugging.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1211
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1212 * New option -k raises an exception when an expression statement
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1213 yields a value other than None.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1214
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1215 * For each option there is now also a corresponding environment
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1216 variable.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1217
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1218
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1219 Using Python as an embedded language
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1220 ------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1221
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1222 * The distribution now contains (some) documentation on the use of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1223 Python as an "embedded language" in other applications, as well as a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1224 simple example. See the file misc/EMBEDDING and the directory embed/.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1225
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1226
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1227 Speed improvements
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1228 ------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1229
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1230 * Function local variables are now generally stored in an array and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1231 accessed using an integer indexing operation, instead of through a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1232 dictionary lookup. (This compensates the somewhat slower dictionary
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1233 lookup caused by the generalization of the dictionary module.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1234
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1235
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1236 Changes to the syntax
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1237 ---------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1238
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1239 * Continuation lines can now *sometimes* be written without a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1240 backslash: if the continuation is contained within nesting (), [] or
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1241 {} brackets the \ may be omitted. There's a much improved
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1242 python-mode.el in the misc directory which knows about this as well.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1243
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1244 * You can no longer use an empty set of parentheses to define a class
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1245 without base classes. That is, you no longer write this:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1246
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1247 class Foo(): # syntax error
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1248 ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1249
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1250 You must write this instead:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1251
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1252 class Foo:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1253 ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1254
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1255 This was already the preferred syntax in release 0.9.8 but many
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1256 people seemed not to have picked it up. There's a Python script that
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1257 fixes old code: demo/scripts/classfix.py.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1258
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1259 * There's a new reserved word: "access". The syntax and semantics are
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1260 still subject of of research and debate (as well as undocumented), but
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1261 the parser knows about the keyword so you must not use it as a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1262 variable, function, or attribute name.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1263
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1264
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1265 Changes to the semantics of the language proper
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1266 -----------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1267
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1268 * The following compatibility hack is removed: if a function was
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1269 defined with two or more arguments, and called with a single argument
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1270 that was a tuple with just as many arguments, the items of this tuple
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1271 would be used as the arguments. This is no longer supported.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1272
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1273
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1274 Changes to the semantics of classes and instances
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1275 -------------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1276
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1277 * Class variables are now also accessible as instance variables for
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1278 reading (assignment creates an instance variable which overrides the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1279 class variable of the same name though).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1280
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1281 * If a class attribute is a user-defined function, a new kind of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1282 object is returned: an "unbound method". This contains a pointer to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1283 the class and can only be called with a first argument which is a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1284 member of that class (or a derived class).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1285
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1286 * If a class defines a method __init__(self, arg1, ...) then this
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1287 method is called when a class instance is created by the classname()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1288 construct. Arguments passed to classname() are passed to the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1289 __init__() method. The __init__() methods of base classes are not
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1290 automatically called; the derived __init__() method must call these if
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1291 necessary (this was done so the derived __init__() method can choose
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1292 the call order and arguments for the base __init__() methods).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1293
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1294 * If a class defines a method __del__(self) then this method is called
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1295 when an instance of the class is about to be destroyed. This makes it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1296 possible to implement clean-up of external resources attached to the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1297 instance. As with __init__(), the __del__() methods of base classes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1298 are not automatically called. If __del__ manages to store a reference
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1299 to the object somewhere, its destruction is postponed; when the object
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1300 is again about to be destroyed its __del__() method will be called
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1301 again.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1302
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1303 * Classes may define a method __hash__(self) to allow their instances
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1304 to be used as dictionary keys. This must return a 32-bit integer.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1305
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1306
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1307 Minor improvements
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1308 ------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1309
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1310 * Function and class objects now know their name (the name given in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1311 the 'def' or 'class' statement that created them).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1312
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1313 * Class instances now know their class name.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1314
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1315
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1316 Additions to built-in operations
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1317 --------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1318
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1319 * The % operator with a string left argument implements formatting
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1320 similar to sprintf() in C. The right argument is either a single
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1321 value or a tuple of values. All features of Standard C sprintf() are
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1322 supported except %p.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1323
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1324 * Dictionaries now support almost any key type, instead of just
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1325 strings. (The key type must be an immutable type or must be a class
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1326 instance where the class defines a method __hash__(), in order to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1327 avoid losing track of keys whose value may change.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1328
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1329 * Built-in methods are now compared properly: when comparing x.meth1
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1330 and y.meth2, if x is equal to y and the methods are defined by the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1331 same function, x.meth1 compares equal to y.meth2.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1332
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1333
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1334 Additions to built-in functions
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1335 -------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1336
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1337 * str(x) returns a string version of its argument. If the argument is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1338 a string it is returned unchanged, otherwise it returns `x`.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1339
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1340 * repr(x) returns the same as `x`. (Some users found it easier to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1341 have this as a function.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1342
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1343 * round(x) returns the floating point number x rounded to an whole
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1344 number, represented as a floating point number. round(x, n) returns x
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1345 rounded to n digits.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1346
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1347 * hasattr(x, name) returns true when x has an attribute with the given
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1348 name.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1349
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1350 * hash(x) returns a hash code (32-bit integer) of an arbitrary
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1351 immutable object's value.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1352
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1353 * id(x) returns a unique identifier (32-bit integer) of an arbitrary
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1354 object.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1355
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1356 * compile() compiles a string to a Python code object.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1357
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1358 * exec() and eval() now support execution of code objects.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1359
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1360
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1361 Changes to the documented part of the library (standard modules)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1362 ----------------------------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1363
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1364 * os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1365 the border case '/foo/..' returns '/' instead of ''.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1366
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1367 * A new function string.find() is added with similar semantics to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1368 string.index(); however when it does not find the given substring it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1369 returns -1 instead of raising string.index_error.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1370
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1371
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1372 Changes to built-in modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1373 ---------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1374
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1375 * New optional module 'array' implements operations on sequences of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1376 integers or floating point numbers of a particular size. This is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1377 useful to manipulate large numerical arrays or to read and write
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1378 binary files consisting of numerical data.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1379
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1380 * Regular expression objects created by module regex now support a new
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1381 method named group(), which returns one or more \(...\) groups by number.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1382 The number of groups is increased from 10 to 100.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1383
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1384 * Function compile() in module regex now supports an optional mapping
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1385 argument; a variable casefold is added to the module which can be used
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1386 as a standard uppercase to lowercase mapping.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1387
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1388 * Module time now supports many routines that are defined in the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1389 Standard C time interface (<time.h>): gmtime(), localtime(),
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1390 asctime(), ctime(), mktime(), as well as these variables (taken from
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1391 System V): timezone, altzone, daylight and tzname. (The corresponding
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1392 functions in the undocumented module calendar have been removed; the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1393 undocumented and unfinished module tzparse is now obsolete and will
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1394 disappear in a future release.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1395
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1396 * Module strop (the fast built-in version of standard module string)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1397 now uses C's definition of whitespace instead of fixing it to space,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1398 tab and newline; in practice this usually means that vertical tab,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1399 form feed and return are now also considered whitespace. It exports
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1400 the string of characters that are considered whitespace as well as the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1401 characters that are considered lowercase or uppercase.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1402
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1403 * Module sys now defines the variable builtin_module_names, a list of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1404 names of modules built into the current interpreter (including not
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1405 yet imported, but excluding two special modules that always have to be
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1406 defined -- sys and builtin).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1407
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1408 * Objects created by module sunaudiodev now also support flush() and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1409 close() methods.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1410
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1411 * Socket objects created by module socket now support an optional
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1412 flags argument for their methods sendto() and recvfrom().
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1413
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1414 * Module marshal now supports dumping to and loading from strings,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1415 through the functions dumps() and loads().
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1416
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1417 * Module stdwin now supports some new functionality. You may have to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1418 ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1419
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1420
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1421 Bugs fixed
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1422 ----------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1423
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1424 * Fixed comparison of negative long integers.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1425
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1426 * The tokenizer no longer botches input lines longer than BUFSIZ.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1427
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1428 * Fixed several severe memory leaks in module select.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1429
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1430 * Fixed memory leaks in modules socket and sv.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1431
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1432 * Fixed memory leak in divmod() for long integers.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1433
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1434 * Problems with definition of floatsleep() on Suns fixed.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1435
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1436 * Many portability bugs fixed (and undoubtedly new ones added :-).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1437
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1438
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1439 Changes to the build procedure
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1440 ------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1441
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1442 * The Makefile supports some new targets: "make default" and "make
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1443 all". Both are by normally equivalent to "make python".
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1444
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1445 * The Makefile no longer uses $> since it's not supported by all
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1446 versions of Make.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1447
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1448 * The header files now all contain #ifdef constructs designed to make
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1449 it safe to include the same header file twice, as well as support for
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1450 inclusion from C++ programs (automatic extern "C" { ... } added).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1451
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1452
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1453 Freezing Python scripts
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1454 -----------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1455
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1456 * There is now some support for "freezing" a Python script as a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1457 stand-alone executable binary file. See the script
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1458 demo/scripts/freeze.py. It will require some site-specific tailoring
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1459 of the script to get this working, but is quite worthwhile if you write
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1460 Python code for other who may not have built and installed Python.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1461
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1462
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1463 MS-DOS
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1464 ------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1465
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1466 * A new MS-DOS port has been done, using MSC 6.0 (I believe). Thanks,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1467 Marcel van der Peijl! This requires fewer compatibility hacks in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1468 posixmodule.c. The executable is not yet available but will be soon
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1469 (check the mailing list).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1470
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1471 * The default PYTHONPATH has changed.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1472
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1473
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1474 Changes for developers of extension modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1475 -------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1476
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1477 * Read src/ChangeLog for full details.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1478
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1479
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1480 SGI specific changes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1481 --------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1482
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1483 * Read src/ChangeLog for full details.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1484
1948
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
1485
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1486 ==================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1487 ==> Release 0.9.8 (9 Jan 1993) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1488 ==================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1489
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1490 I claim no completeness here, but I've tried my best to scan the log
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1491 files throughout my source tree for interesting bits of news. A more
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1492 complete account of the changes is to be found in the various
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1493 ChangeLog files. See also "News for release 0.9.7beta" below if you're
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1494 still using release 0.9.6, and the file HISTORY if you have an even
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1495 older release.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1496
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1497 --Guido
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1498
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1499
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1500 Changes to the language proper
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1501 ------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1502
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1503 There's only one big change: the conformance checking for function
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1504 argument lists (of user-defined functions only) is stricter. Earlier,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1505 you could get away with the following:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1506
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1507 (a) define a function of one argument and call it with any
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1508 number of arguments; if the actual argument count wasn't
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1509 one, the function would receive a tuple containing the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1510 arguments arguments (an empty tuple if there were none).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1511
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1512 (b) define a function of two arguments, and call it with more
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1513 than two arguments; if there were more than two arguments,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1514 the second argument would be passed as a tuple containing
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1515 the second and further actual arguments.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1516
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1517 (Note that an argument (formal or actual) that is a tuple is counted as
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1518 one; these rules don't apply inside such tuples, only at the top level
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1519 of the argument list.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1520
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1521 Case (a) was needed to accommodate variable-length argument lists;
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1522 there is now an explicit "varargs" feature (precede the last argument
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1523 with a '*'). Case (b) was needed for compatibility with old class
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1524 definitions: up to release 0.9.4 a method with more than one argument
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1525 had to be declared as "def meth(self, (arg1, arg2, ...)): ...".
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1526 Version 0.9.6 provide better ways to handle both casees, bot provided
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1527 backward compatibility; version 0.9.8 retracts the compatibility hacks
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1528 since they also cause confusing behavior if a function is called with
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1529 the wrong number of arguments.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1530
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1531 There's a script that helps converting classes that still rely on (b),
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1532 provided their methods' first argument is called "self":
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1533 demo/scripts/methfix.py.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1534
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1535 If this change breaks lots of code you have developed locally, try
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1536 #defining COMPAT_HACKS in ceval.c.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1537
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1538 (There's a third compatibility hack, which is the reverse of (a): if a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1539 function is defined with two or more arguments, and called with a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1540 single argument that is a tuple with just as many arguments, the items
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1541 of this tuple will be used as the arguments. Although this can (and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1542 should!) be done using the built-in function apply() instead, it isn't
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1543 withdrawn yet.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1544
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1545
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1546 One minor change: comparing instance methods works like expected, so
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1547 that if x is an instance of a user-defined class and has a method m,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1548 then (x.m==x.m) yields 1.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1549
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1550
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1551 The following was already present in 0.9.7beta, but not explicitly
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1552 mentioned in the NEWS file: user-defined classes can now define types
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1553 that behave in almost allrespects like numbers. See
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1554 demo/classes/Rat.py for a simple example.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1555
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1556
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1557 Changes to the build process
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1558 ----------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1559
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1560 The Configure.py script and the Makefile has been made somewhat more
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1561 bullet-proof, after reports of (minor) trouble on certain platforms.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1562
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1563 There is now a script to patch Makefile and config.c to add a new
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1564 optional built-in module: Addmodule.sh. Read the script before using!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1565
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1566 Useing Addmodule.sh, all optional modules can now be configured at
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1567 compile time using Configure.py, so there are no modules left that
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1568 require dynamic loading.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1569
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1570 The Makefile has been fixed to make it easier to use with the VPATH
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1571 feature of some Make versions (e.g. SunOS).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1572
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1573
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1574 Changes affecting portability
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1575 -----------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1576
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1577 Several minor portability problems have been solved, e.g. "malloc.h"
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1578 has been renamed to "mymalloc.h", "strdup.c" is no longer used, and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1579 the system now tolerates malloc(0) returning 0.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1580
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1581 For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1582 distributed with Python. This solves several minor problems, in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1583 particular scripts invoked using #! can now use dynamic loading.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1584
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1585
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1586 Changes to the interpreter interface
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1587 ------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1588
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1589 On popular demand, there's finally a "profile" feature for interactive
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1590 use of the interpreter. If the environment variable $PYTHONSTARTUP is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1591 set to the name of an existing file, Python statements in this file
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1592 are executed when the interpreter is started in interactive mode.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1593
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1594 There is a new clean-up mechanism, complementing try...finally: if you
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1595 assign a function object to sys.exitfunc, it will be called when
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1596 Python exits or receives a SIGTERM or SIGHUP signal.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1597
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1598 The interpreter is now generally assumed to live in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1599 /usr/local/bin/python (as opposed to /usr/local/python). The script
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1600 demo/scripts/fixps.py will update old scripts in place (you can easily
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1601 modify it to do other similar changes).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1602
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1603 Most I/O that uses sys.stdin/stdout/stderr will now use any object
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1604 assigned to those names as long as the object supports readline() or
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1605 write() methods.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1606
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1607 The parser stack has been increased to 500 to accommodate more
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1608 complicated expressions (7 levels used to be the practical maximum,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1609 it's now about 38).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1610
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1611 The limit on the size of the *run-time* stack has completely been
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1612 removed -- this means that tuple or list displays can contain any
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1613 number of elements (formerly more than 50 would crash the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1614 interpreter).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1615
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1616
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1617 Changes to existing built-in functions and methods
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1618 --------------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1619
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1620 The built-in functions int(), long(), float(), oct() and hex() now
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1621 also apply to class instalces that define corresponding methods
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1622 (__int__ etc.).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1623
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1624
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1625 New built-in functions
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1626 ----------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1627
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1628 The new functions str() and repr() convert any object to a string.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1629 The function repr(x) is in all respects equivalent to `x` -- some
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1630 people prefer a function for this. The function str(x) does the same
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1631 except if x is already a string -- then it returns x unchanged
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1632 (repr(x) adds quotes and escapes "funny" characters as octal escapes).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1633
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1634 The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1635
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1636
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1637 Changes to general built-in modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1638 -----------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1639
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1640 The time module's functions are more general: time() returns a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1641 floating point number and sleep() accepts one. Their accuracies
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1642 depends on the precision of the system clock. Millisleep is no longer
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1643 needed (although it still exists for now), but millitimer is still
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1644 needed since on some systems wall clock time is only available with
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1645 seconds precision, while a source of more precise time exists that
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1646 isn't synchronized with the wall clock. (On UNIX systems that support
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1647 the BSD gettimeofday() function, time.time() is as time.millitimer().)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1648
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1649 The string representation of a file object now includes an address:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1650 '<file 'filename', mode 'r' at #######>' where ###### is a hex number
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1651 (the object's address) to make it unique.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1652
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1653 New functions added to posix: nice(), setpgrp(), and if your system
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1654 supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp().
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1655
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1656 Improvements to the socket module: socket objects have new methods
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1657 getpeername() and getsockname(), and the {get,set}sockopt methods can
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1658 now get/set any kind of option using strings built with the new struct
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1659 module. And there's a new function fromfd() which creates a socket
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1660 object given a file descriptor (useful for servers started by inetd,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1661 which have a socket connected to stdin and stdout).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1662
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1663
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1664 Changes to SGI-specific built-in modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1665 ----------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1666
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1667 The FORMS library interface (fl) now requires FORMS 2.1a. Some new
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1668 functions have been added and some bugs have been fixed.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1669
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1670 Additions to al (audio library interface): added getname(),
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1671 getdefault() and getminmax().
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1672
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1673 The gl modules doesn't call "foreground()" when initialized (this
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1674 caused some problems) like it dit in 0.9.7beta (but not before).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1675 There's a new gl function 'gversion() which returns a version string.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1676
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1677 The interface to sv (Indigo video interface) has totally changed.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1678 (Sorry, still no documentation, but see the examples in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1679 demo/sgi/{sv,video}.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1680
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1681
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1682 Changes to standard library modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1683 -----------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1684
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1685 Most functions in module string are now much faster: they're actually
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1686 implemented in C. The module containing the C versions is called
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1687 "strop" but you should still import "string" since strop doesn't
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1688 provide all the interfaces defined in string (and strop may be renamed
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1689 to string when it is complete in a future release).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1690
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1691 string.index() now accepts an optional third argument giving an index
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1692 where to start searching in the first argument, so you can find second
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1693 and further occurrences (this is similar to the regular expression
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1694 functions in regex).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1695
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1696 The definition of what string.splitfields(anything, '') should return
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1697 is changed for the last time: it returns a singleton list containing
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1698 its whole first argument unchanged. This is compatible with
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1699 regsub.split() which also ignores empty delimiter matches.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1700
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1701 posixpath, macpath: added dirname() and normpath() (and basename() to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1702 macpath).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1703
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1704 The mainloop module (for use with stdwin) can now demultiplex input
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1705 from other sources, as long as they can be polled with select().
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1706
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1707
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1708 New built-in modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1709 --------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1710
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1711 Module struct defines functions to pack/unpack values to/from strings
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1712 representing binary values in native byte order.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1713
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1714 Module strop implements C versions of many functions from string (see
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1715 above).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1716
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1717 Optional module fcntl defines interfaces to fcntl() and ioctl() --
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1718 UNIX only. (Not yet properly documented -- see however src/fcntl.doc.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1719
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1720 Optional module mpz defines an interface to an altaernative long
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1721 integer implementation, the GNU MPZ library.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1722
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1723 Optional module md5 uses the GNU MPZ library to calculate MD5
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1724 signatures of strings.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1725
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1726 There are also optional new modules specific to SGI machines: imageop
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1727 defines some simple operations to images represented as strings; sv
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1728 interfaces to the Indigo video board; cl interfaces to the (yet
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1729 unreleased) compression library.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1730
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1731
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1732 New standard library modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1733 ----------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1734
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1735 (Unfortunately the following modules are not all documented; read the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1736 sources to find out more about them!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1737
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1738 autotest: run testall without showing any output unless it differs
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1739 from the expected output
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1740
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1741 bisect: use bisection to insert or find an item in a sorted list
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1742
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1743 colorsys: defines conversions between various color systems (e.g. RGB
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1744 <-> YUV)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1745
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1746 nntplib: a client interface to NNTP servers
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1747
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1748 pipes: utility to construct pipeline from templates, e.g. for
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1749 conversion from one file format to another using several utilities.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1750
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1751 regsub: contains three functions that are more or less compatible with
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1752 awk functions of the same name: sub() and gsub() do string
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1753 substitution, split() splits a string using a regular expression to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1754 define how separators are define.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1755
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1756 test_types: test operations on the built-in types of Python
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1757
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1758 toaiff: convert various audio file formats to AIFF format
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1759
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1760 tzparse: parse the TZ environment parameter (this may be less general
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1761 than it could be, let me know if you fix it).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1762
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1763 (Note that the obsolete module "path" no longer exists.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1764
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1765
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1766 New SGI-specific library modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1767 --------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1768
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1769 CL: constants for use with the built-in compression library interface (cl)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1770
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1771 Queue: a multi-producer, multi-consumer queue class implemented for
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1772 use with the built-in thread module
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1773
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1774 SOCKET: constants for use with built-in module socket, e.g. to set/get
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1775 socket options. This is SGI-specific because the constants to be
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1776 passed are system-dependent. You can generate a version for your own
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1777 system by running the script demo/scripts/h2py.py with
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1778 /usr/include/sys/socket.h as input.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1779
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1780 cddb: interface to the database used the the CD player
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1781
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1782 torgb: convert various image file types to rgb format (requires pbmplus)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1783
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1784
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1785 New demos
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1786 ---------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1787
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1788 There's an experimental interface to define Sun RPC clients and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1789 servers in demo/rpc.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1790
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1791 There's a collection of interfaces to WWW, WAIS and Gopher (both
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1792 Python classes and program providing a user interface) in demo/www.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1793 This includes a program texi2html.py which converts texinfo files to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1794 HTML files (the format used hy WWW).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1795
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1796 The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1797
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1798 For SGI systems, there's a whole collection of programs and classes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1799 that make use of the Indigo video board in demo/sgi/{sv,video}. This
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1800 represents a significant amount of work that we're giving away!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1801
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1802 There are demos "rsa" and "md5test" that exercise the mpz and md5
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1803 modules, respectively. The rsa demo is a complete implementation of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1804 the RSA public-key cryptosystem!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1805
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1806 A bunch of games and examples submitted by Stoffel Erasmus have been
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1807 included in demo/stoffel.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1808
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1809 There are miscellaneous new files in some existing demo
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1810 subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1811 sgi/al/cmpaf.py, sockets/{mcast,gopher}.py.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1812
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1813 There are also many minor changes to existing files, but I'm too lazy
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1814 to run a diff and note the differences -- you can do this yourself if
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1815 you save the old distribution's demos. One highlight: the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1816 stdwin/python.py demo is much improved!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1817
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1818
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1819 Changes to the documentation
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1820 ----------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1821
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1822 The LaTeX source for the library uses different macros to enable it to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1823 be converted to texinfo, and from there to INFO or HTML format so it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1824 can be browsed as a hypertext. The net result is that you can now
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1825 read the Python library documentation in Emacs info mode!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1826
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1827
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1828 Changes to the source code that affect C extension writers
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1829 ----------------------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1830
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1831 The function strdup() no longer exists (it was used only in one places
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1832 and is somewhat of a a portability problem sice some systems have the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1833 same function in their C library.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1834
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1835 The functions NEW() and RENEW() allocate one spare byte to guard
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1836 against a NULL return from malloc(0) being taken for an error, but
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1837 this should not be relied upon.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1838
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1839
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1840 =========================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1841 ==> Release 0.9.7beta <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1842 =========================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1843
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1844
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1845 Changes to the language proper
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1846 ------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1847
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1848 User-defined classes can now implement operations invoked through
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1849 special syntax, such as x[i] or `x` by defining methods named
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1850 __getitem__(self, i) or __repr__(self), etc.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1851
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1852
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1853 Changes to the build process
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1854 ----------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1855
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1856 Instead of extensive manual editing of the Makefile to select
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1857 compile-time options, you can now run a Configure.py script.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1858 The Makefile as distributed builds a minimal interpreter sufficient to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1859 run Configure.py. See also misc/BUILD
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1860
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1861 The Makefile now includes more "utility" targets, e.g. install and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1862 tags/TAGS
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1863
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1864 Using the provided strtod.c and strtol.c are now separate options, as
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1865 on the Sun the provided strtod.c dumps core :-(
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1866
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1867 The regex module is now an option chosen by the Makefile, since some
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1868 (old) C compilers choke on regexpr.c
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1869
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1870
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1871 Changes affecting portability
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1872 -----------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1873
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1874 You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1875 interface
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1876
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1877 Dynamic loading is now supported for Sun (and other non-COFF systems)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1878 throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1879 DL is out, 1.4)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1880
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1881 The system-dependent code for the use of the select() system call is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1882 moved to one file: myselect.h
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1883
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1884 Thanks to Jaap Vermeulen, the code should now port cleanly to the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1885 SEQUENT
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1886
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1887
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1888 Changes to the interpreter interface
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1889 ------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1890
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1891 The interpretation of $PYTHONPATH in the environment is different: it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1892 is inserted in front of the default path instead of overriding it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1893
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1894
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1895 Changes to existing built-in functions and methods
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1896 --------------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1897
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1898 List objects now support an optional argument to their sort() method,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1899 which is a comparison function similar to qsort(3) in C
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1900
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1901 File objects now have a method fileno(), used by the new select module
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1902 (see below)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1903
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1904
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1905 New built-in function
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1906 ---------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1907
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1908 coerce(x, y): take two numbers and return a tuple containing them
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1909 both converted to a common type
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1910
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1911
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1912 Changes to built-in modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1913 ---------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1914
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1915 sys: fixed core dumps in settrace() and setprofile()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1916
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1917 socket: added socket methods setsockopt() and getsockopt(); and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1918 fileno(), used by the new select module (see below)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1919
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1920 stdwin: added fileno() == connectionnumber(), in support of new module
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1921 select (see below)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1922
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1923 posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1924
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1925 gl: added qgetfd()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1926
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1927 fl: added several new functions, fixed several obscure bugs, adapted
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1928 to FORMS 2.1
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1929
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1930
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1931 Changes to standard modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1932 ---------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1933
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1934 posixpath: changed implementation of ismount()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1935
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1936 string: atoi() no longer mistakes leading zero for octal number
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1937
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1938 ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1939
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1940
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1941 New built-in modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1942 --------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1943
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1944 Modules marked "dynamic only" are not configured at compile time but
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1945 can be loaded dynamically. You need to turn on the DL or DLD option in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1946 the Makefile for support dynamic loading of modules (this requires
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1947 external code).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1948
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1949 select: interfaces to the BSD select() system call
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1950
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1951 dbm: interfaces to the (new) dbm library (dynamic only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1952
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1953 nis: interfaces to some NIS functions (aka yellow pages)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1954
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1955 thread: limited form of multiple threads (sgi only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1956
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1957 audioop: operations useful for audio programs, e.g. u-LAW and ADPCM
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1958 coding (dynamic only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1959
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1960 cd: interface to Indigo SCSI CDROM player audio library (sgi only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1961
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1962 jpeg: read files in JPEG format (dynamic only, sgi only; needs
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1963 external code)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1964
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1965 imgfile: read SGI image files (dynamic only, sgi only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1966
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1967 sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1968
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1969 sv: interface to Indigo video library (sgi only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1970
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1971 pc: a minimal set of MS-DOS interfaces (MS-DOS only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1972
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1973 rotor: encryption, by Lance Ellinghouse (dynamic only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1974
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1975
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1976 New standard modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1977 --------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1978
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1979 Not all these modules are documented. Read the source:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1980 lib/<modulename>.py. Sometimes a file lib/<modulename>.doc contains
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1981 additional documentation.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1982
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1983 imghdr: recognizes image file headers
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1984
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1985 sndhdr: recognizes sound file headers
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1986
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1987 profile: print run-time statistics of Python code
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1988
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1989 readcd, cdplayer: companion modules for built-in module cd (sgi only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1990
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1991 emacs: interface to Emacs using py-connect.el (see below).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1992
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1993 SOCKET: symbolic constant definitions for socket options
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1994
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1995 SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1996
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1997 SV: symbolic constat definitions for sv (sgi only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1998
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
1999 CD: symbolic constat definitions for cd (sgi only)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2000
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2001
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2002 New demos
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2003 ---------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2004
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2005 scripts/pp.py: execute Python as a filter with a Perl-like command
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2006 line interface
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2007
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2008 classes/: examples using the new class features
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2009
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2010 threads/: examples using the new thread module
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2011
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2012 sgi/cd/: examples using the new cd module
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2013
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2014
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2015 Changes to the documentation
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2016 ----------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2017
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2018 The last-minute syntax changes of release 0.9.6 are now reflected
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2019 everywhere in the manuals
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2020
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2021 The reference manual has a new section (3.2) on implementing new kinds
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2022 of numbers, sequences or mappings with user classes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2023
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2024 Classes are now treated extensively in the tutorial (chapter 9)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2025
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2026 Slightly restructured the system-dependent chapters of the library
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2027 manual
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2028
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2029 The file misc/EXTENDING incorporates documentation for mkvalue() and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2030 a new section on error handling
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2031
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2032 The files misc/CLASSES and misc/ERRORS are no longer necessary
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2033
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2034 The doc/Makefile now creates PostScript files automatically
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2035
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2036
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2037 Miscellaneous changes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2038 ---------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2039
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2040 Incorporated Tim Peters' changes to python-mode.el, it's now version
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2041 1.06
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2042
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2043 A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2044 program running in an Emacs buffer execute Emacs lisp code. The
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2045 necessary Python code is in lib/emacs.py. The Emacs code is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2046 misc/py-connect.el (it needs some external Emacs lisp code)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2047
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2048
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2049 Changes to the source code that affect C extension writers
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2050 ----------------------------------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2051
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2052 New service function mkvalue() to construct a Python object from C
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2053 values according to a "format" string a la getargs()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2054
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2055 Most functions from pythonmain.c moved to new pythonrun.c which is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2056 in libpython.a. This should make embedded versions of Python easier
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2057
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2058 ceval.h is split in eval.h (which needs compile.h and only declares
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2059 eval_code) and ceval.h (which doesn't need compile.hand declares the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2060 rest)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2061
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2062 ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2063 improve the parallellism of multi-threaded programs by letting other
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2064 Python code run when a blocking system call or something similar is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2065 made)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2066
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2067 In structmember.[ch], new member types BYTE, CHAR and unsigned
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2068 variants have been added
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2069
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2070 New file xxmodule.c is a template for new extension modules.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2071
1948
9bcac8da0262 Moved older news to HISTORY file
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
2072
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2073 ==================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2074 ==> RELEASE 0.9.6 (6 Apr 1992) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2075 ==================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2076
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2077 Misc news in 0.9.6:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2078 - Restructured the misc subdirectory
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2079 - Reference manual completed, library manual much extended (with indexes!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2080 - the GNU Readline library is now distributed standard with Python
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2081 - the script "../demo/scripts/classfix.py" fixes Python modules using old
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2082 class syntax
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2083 - Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2084 - Because of the GNU copyleft business I am not using the GNU regular
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2085 expression implementation but a free re-implementation by Tatu Ylonen
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2086 that recently appeared in comp.sources.misc (Bravo, Tatu!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2087
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2088 New features in 0.9.6:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2089 - stricter try stmt syntax: cannot mix except and finally clauses on 1 try
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2090 - New module 'os' supplants modules 'mac' and 'posix' for most cases;
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2091 module 'path' is replaced by 'os.path'
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2092 - os.path.split() return value differs from that of old path.split()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2093 - sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2094 currently being handled
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2095 - sys.last_type, sys.last_value, sys.last_traceback remember last unhandled
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2096 exception
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2097 - New function string.expandtabs() expands tabs in a string
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2098 - Added times() interface to posix (user & sys time of process & children)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2099 - Added uname() interface to posix (returns OS type, hostname, etc.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2100 - New built-in function execfile() is like exec() but from a file
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2101 - Functions exec() and eval() are less picky about whitespace/newlines
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2102 - New built-in functions getattr() and setattr() access arbitrary attributes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2103 - More generic argument handling in built-in functions (see "./EXTENDING")
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2104 - Dynamic loading of modules written in C or C++ (see "./DYNLOAD")
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2105 - Division and modulo for long and plain integers with negative operands
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2106 have changed; a/b is now floor(float(a)/float(b)) and a%b is defined
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2107 as a-(a/b)*b. So now the outcome of divmod(a,b) is the same as
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2108 (a/b, a%b) for integers. For floats, % is also changed, but of course
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2109 / is unchanged, and divmod(x,y) does not yield (x/y, x%y)...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2110 - A function with explicit variable-length argument list can be declared
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2111 like this: def f(*args): ...; or even like this: def f(a, b, *rest): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2112 - Code tracing and profiling features have been added, and two source
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2113 code debuggers are provided in the library (pdb.py, tty-oriented,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2114 and wdb, window-oriented); you can now step through Python programs!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2115 See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc"
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2116 - '==' is now the only equality operator; "../demo/scripts/eqfix.py" is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2117 a script that fixes old Python modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2118 - Plain integer right shift now uses sign extension
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2119 - Long integer shift/mask operations now simulate 2's complement
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2120 to give more useful results for negative operands
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2121 - Changed/added range checks for long/plain integer shifts
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2122 - Options found after "-c command" are now passed to the command in sys.argv
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2123 (note subtle incompatiblity with "python -c command -- -options"!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2124 - Module stdwin is better protected against touching objects after they've
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2125 been closed; menus can now also be closed explicitly
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2126 - Stdwin now uses its own exception (stdwin.error)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2127
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2128 New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992):
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2129 - dictionary objects can now be compared properly; e.g., {}=={} is true
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2130 - new exception SystemExit causes termination if not caught;
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2131 it is raised by sys.exit() so that 'finally' clauses can clean up,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2132 and it may even be caught. It does work interactively!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2133 - new module "regex" implements GNU Emacs style regular expressions;
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2134 module "regexp" is rewritten in Python for backward compatibility
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2135 - formal parameter lists may contain trailing commas
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2136
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2137 Bugs fixed in 0.9.6:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2138 - assigning to or deleting a list item with a negative index dumped core
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2139 - divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2140
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2141 Bugs fixed in 0.9.5:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2142 - masking operations involving negative long integers gave wrong results
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2143
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2144
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2145 ===================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2146 ==> RELEASE 0.9.4 (24 Dec 1991) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2147 ===================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2148
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2149 - new function argument handling (see below)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2150 - built-in apply(func, args) means func(args[0], args[1], ...)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2151 - new, more refined exceptions
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2152 - new exception string values (NameError = 'NameError' etc.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2153 - better checking for math exceptions
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2154 - for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i]
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2155 - fixed list assignment bug: "a[1:1] = a" now works correctly
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2156 - new class syntax, without extraneous parentheses
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2157 - new 'global' statement to assign global variables from within a function
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2158
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2159
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2160 New class syntax
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2161 ----------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2162
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2163 You can now declare a base class as follows:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2164
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2165 class B: # Was: class B():
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2166 def some_method(self): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2167 ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2168
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2169 and a derived class thusly:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2170
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2171 class D(B): # Was: class D() = B():
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2172 def another_method(self, arg): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2173
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2174 Multiple inheritance looks like this:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2175
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2176 class M(B, D): # Was: class M() = B(), D():
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2177 def this_or_that_method(self, arg): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2178
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2179 The old syntax is still accepted by Python 0.9.4, but will disappear
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2180 in Python 1.0 (to be posted to comp.sources).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2181
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2182
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2183 New 'global' statement
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2184 ----------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2185
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2186 Every now and then you have a global variable in a module that you
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2187 want to change from within a function in that module -- say, a count
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2188 of calls to a function, or an option flag, etc. Until now this was
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2189 not directly possible. While several kludges are known that
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2190 circumvent the problem, and often the need for a global variable can
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2191 be avoided by rewriting the module as a class, this does not always
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2192 lead to clearer code.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2193
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2194 The 'global' statement solves this dilemma. Its occurrence in a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2195 function body means that, for the duration of that function, the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2196 names listed there refer to global variables. For instance:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2197
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2198 total = 0.0
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2199 count = 0
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2200
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2201 def add_to_total(amount):
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2202 global total, count
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2203 total = total + amount
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2204 count = count + 1
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2205
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2206 'global' must be repeated in each function where it is needed. The
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2207 names listed in a 'global' statement must not be used in the function
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2208 before the statement is reached.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2209
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2210 Remember that you don't need to use 'global' if you only want to *use*
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2211 a global variable in a function; nor do you need ot for assignments to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2212 parts of global variables (e.g., list or dictionary items or
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2213 attributes of class instances). This has not changed; in fact
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2214 assignment to part of a global variable was the standard workaround.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2215
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2216
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2217 New exceptions
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2218 --------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2219
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2220 Several new exceptions have been defined, to distinguish more clearly
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2221 between different types of errors.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2222
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2223 name meaning was
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2224
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2225 AttributeError reference to non-existing attribute NameError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2226 IOError unexpected I/O error RuntimeError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2227 ImportError import of non-existing module or name NameError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2228 IndexError invalid string, tuple or list index RuntimeError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2229 KeyError key not in dictionary RuntimeError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2230 OverflowError numeric overflow RuntimeError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2231 SyntaxError invalid syntax RuntimeError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2232 ValueError invalid argument value RuntimeError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2233 ZeroDivisionError division by zero RuntimeError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2234
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2235 The string value of each exception is now its name -- this makes it
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2236 easier to experimentally find out which operations raise which
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2237 exceptions; e.g.:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2238
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2239 >>> KeyboardInterrupt
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2240 'KeyboardInterrupt'
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2241 >>>
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2242
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2243
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2244 New argument passing semantics
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2245 ------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2246
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2247 Off-line discussions with Steve Majewski and Daniel LaLiberte have
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2248 convinced me that Python's parameter mechanism could be changed in a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2249 way that made both of them happy (I hope), kept me happy, fixed a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2250 number of outstanding problems, and, given some backward compatibility
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2251 provisions, would only break a very small amount of existing code --
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2252 probably all mine anyway. In fact I suspect that most Python users
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2253 will hardly notice the difference. And yet it has cost me at least
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2254 one sleepless night to decide to make the change...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2255
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2256 Philosophically, the change is quite radical (to me, anyway): a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2257 function is no longer called with either zero or one argument, which
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2258 is a tuple if there appear to be more arguments. Every function now
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2259 has an argument list containing 0, 1 or more arguments. This list is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2260 always implemented as a tuple, and it is a (run-time) error if a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2261 function is called with a different number of arguments than expected.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2262
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2263 What's the difference? you may ask. The answer is, very little unless
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2264 you want to write variadic functions -- functions that may be called
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2265 with a variable number of arguments. Formerly, you could write a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2266 function that accepted one or more arguments with little trouble, but
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2267 writing a function that could be called with either 0 or 1 argument
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2268 (or more) was next to impossible. This is now a piece of cake: you
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2269 can simply declare an argument that receives the entire argument
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2270 tuple, and check its length -- it will be of size 0 if there are no
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2271 arguments.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2272
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2273 Another anomaly of the old system was the way multi-argument methods
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2274 (in classes) had to be declared, e.g.:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2275
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2276 class Point():
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2277 def init(self, (x, y, color)): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2278 def setcolor(self, color): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2279 dev moveto(self, (x, y)): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2280 def draw(self): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2281
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2282 Using the new scheme there is no need to enclose the method arguments
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2283 in an extra set of parentheses, so the above class could become:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2284
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2285 class Point:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2286 def init(self, x, y, color): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2287 def setcolor(self, color): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2288 dev moveto(self, x, y): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2289 def draw(self): ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2290
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2291 That is, the equivalence rule between methods and functions has
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2292 changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2293 while formerly it was equivalent to Point.moveto(p,(x,y)).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2294
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2295 A special backward compatibility rule makes that the old version also
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2296 still works: whenever a function with exactly two arguments (at the top
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2297 level) is called with more than two arguments, the second and further
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2298 arguments are packed into a tuple and passed as the second argument.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2299 This rule is invoked independently of whether the function is actually a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2300 method, so there is a slight chance that some erroneous calls of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2301 functions expecting two arguments with more than that number of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2302 arguments go undetected at first -- when the function tries to use the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2303 second argument it may find it is a tuple instead of what was expected.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2304 Note that this rule will be removed from future versions of the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2305 language; it is a backward compatibility provision *only*.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2306
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2307 Two other rules and a new built-in function handle conversion between
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2308 tuples and argument lists:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2309
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2310 Rule (a): when a function with more than one argument is called with a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2311 single argument that is a tuple of the right size, the tuple's items
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2312 are used as arguments.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2313
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2314 Rule (b): when a function with exactly one argument receives no
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2315 arguments or more than one, that one argument will receive a tuple
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2316 containing the arguments (the tuple will be empty if there were no
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2317 arguments).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2318
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2319
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2320 A new built-in function, apply(), was added to support functions that
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2321 need to call other functions with a constructed argument list. The call
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2322
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2323 apply(function, tuple)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2324
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2325 is equivalent to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2326
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2327 function(tuple[0], tuple[1], ..., tuple[len(tuple)-1])
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2328
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2329
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2330 While no new argument syntax was added in this phase, it would now be
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2331 quite sensible to add explicit syntax to Python for default argument
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2332 values (as in C++ or Modula-3), or a "rest" argument to receive the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2333 remaining arguments of a variable-length argument list.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2334
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2335
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2336 ========================================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2337 ==> Release 0.9.3 (never made available outside CWI) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2338 ========================================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2339
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2340 - string sys.version shows current version (also printed on interactive entry)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2341 - more detailed exceptions, e.g., IOError, ZeroDivisionError, etc.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2342 - 'global' statement to declare module-global variables assigned in functions.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2343 - new class declaration syntax: class C(Base1, Base2, ...): suite
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2344 (the old syntax is still accepted -- be sure to convert your classes now!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2345 - C shifting and masking operators: << >> ~ & ^ | (for ints and longs).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2346 - C comparison operators: == != (the old = and <> remain valid).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2347 - floating point numbers may now start with a period (e.g., .14).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2348 - definition of integer division tightened (always truncates towards zero).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2349 - new builtins hex(x), oct(x) return hex/octal string from (long) integer.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2350 - new list method l.count(x) returns the number of occurrences of x in l.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2351 - new SGI module: al (Indigo and 4D/35 audio library).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2352 - the FORMS interface (modules fl and FL) now uses FORMS 2.0
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2353 - module gl: added lrect{read,write}, rectzoom and pixmode;
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2354 added (non-GL) functions (un)packrect.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2355 - new socket method: s.allowbroadcast(flag).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2356 - many objects support __dict__, __methods__ or __members__.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2357 - dir() lists anything that has __dict__.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2358 - class attributes are no longer read-only.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2359 - classes support __bases__, instances support __class__ (and __dict__).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2360 - divmod() now also works for floats.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2361 - fixed obscure bug in eval('1 ').
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2362
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2363
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2364 ===================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2365 ==> Release 0.9.2 (Autumn 1991) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2366 ===================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2367
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2368 Highlights
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2369 ----------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2370
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2371 - tutorial now (almost) complete; library reference reorganized
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2372 - new syntax: continue statement; semicolons; dictionary constructors;
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2373 restrictions on blank lines in source files removed
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2374 - dramatically improved module load time through precompiled modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2375 - arbitrary precision integers: compute 2 to the power 1000 and more...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2376 - arithmetic operators now accept mixed type operands, e.g., 3.14/4
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2377 - more operations on list: remove, index, reverse; repetition
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2378 - improved/new file operations: readlines, seek, tell, flush, ...
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2379 - process management added to the posix module: fork/exec/wait/kill etc.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2380 - BSD socket operations (with example servers and clients!)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2381 - many new STDWIN features (color, fonts, polygons, ...)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2382 - new SGI modules: font manager and FORMS library interface
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2383
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2384
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2385 Extended list of changes in 0.9.2
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2386 ---------------------------------
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2387
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2388 Here is a summary of the most important user-visible changes in 0.9.2,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2389 in somewhat arbitrary order. Changes in later versions are listed in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2390 the "highlights" section above.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2391
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2392
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2393 1. Changes to the interpreter proper
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2394
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2395 - Simple statements can now be separated by semicolons.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2396 If you write "if t: s1; s2", both s1 and s2 are executed
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2397 conditionally.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2398 - The 'continue' statement was added, with semantics as in C.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2399 - Dictionary displays are now allowed on input: {key: value, ...}.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2400 - Blank lines and lines bearing only a comment no longer need to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2401 be indented properly. (A completely empty line still ends a multi-
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2402 line statement interactively.)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2403 - Mixed arithmetic is supported, 1 compares equal to 1.0, etc.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2404 - Option "-c command" to execute statements from the command line
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2405 - Compiled versions of modules are cached in ".pyc" files, giving a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2406 dramatic improvement of start-up time
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2407 - Other, smaller speed improvements, e.g., extracting characters from
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2408 strings, looking up single-character keys, and looking up global
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2409 variables
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2410 - Interrupting a print operation raises KeyboardInterrupt instead of
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2411 only cancelling the print operation
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2412 - Fixed various portability problems (it now passes gcc with only
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2413 warnings -- more Standard C compatibility will be provided in later
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2414 versions)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2415 - Source is prepared for porting to MS-DOS
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2416 - Numeric constants are now checked for overflow (this requires
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2417 standard-conforming strtol() and strtod() functions; a correct
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2418 strtol() implementation is provided, but the strtod() provided
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2419 relies on atof() for everything, including error checking
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2420
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2421
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2422 2. Changes to the built-in types, functions and modules
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2423
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2424 - New module socket: interface to BSD socket primitives
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2425 - New modules pwd and grp: access the UNIX password and group databases
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2426 - (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2427 - (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2428 - New numeric type: long integer, for unlimited precision
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2429 - integer constants suffixed with 'L' or 'l' are long integers
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2430 - new built-in function long(x) converts int or float to long
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2431 - int() and float() now also convert from long integers
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2432 - New built-in function:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2433 - pow(x, y) returns x to the power y
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2434 - New operation and methods for lists:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2435 - l*n returns a new list consisting of n concatenated copies of l
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2436 - l.remove(x) removes the first occurrence of the value x from l
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2437 - l.index(x) returns the index of the first occurrence of x in l
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2438 - l.reverse() reverses l in place
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2439 - New operation for tuples:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2440 - t*n returns a tuple consisting of n concatenated copies of t
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2441 - Improved file handling:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2442 - f.readline() no longer restricts the line length, is faster,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2443 and isn't confused by null bytes; same for raw_input()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2444 - f.read() without arguments reads the entire (rest of the) file
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2445 - mixing of print and sys.stdout.write() has different effect
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2446 - New methods for files:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2447 - f.readlines() returns a list containing the lines of the file,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2448 as read with f.readline()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2449 - f.flush(), f.tell(), f.seek() call their stdio counterparts
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2450 - f.isatty() tests for "tty-ness"
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2451 - New posix functions:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2452 - _exit(), exec(), fork(), getpid(), getppid(), kill(), wait()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2453 - popen() returns a file object connected to a pipe
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2454 - utime() replaces utimes() (the latter is not a POSIX name)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2455 - New stdwin features, including:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2456 - font handling
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2457 - color drawing
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2458 - scroll bars made optional
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2459 - polygons
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2460 - filled and xor shapes
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2461 - text editing objects now have a 'settext' method
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2462
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2463
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2464 3. Changes to the standard library
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2465
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2466 - Name change: the functions path.cat and macpath.cat are now called
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2467 path.join and macpath.join
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2468 - Added new modules: formatter, mutex, persist, sched, mainloop
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2469 - Added some modules and functionality to the "widget set" (which is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2470 still under development, so please bear with me):
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2471 DirList, FormSplit, TextEdit, WindowSched
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2472 - Fixed module testall to work non-interactively
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2473 - Module string:
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2474 - added functions join() and joinfields()
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2475 - fixed center() to work correct and make it "transitive"
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2476 - Obsolete modules were removed: util, minmax
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2477 - Some modules were moved to the demo directory
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2478
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2479
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2480 4. Changes to the demonstration programs
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2481
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2482 - Added new useful scipts: byteyears, eptags, fact, from, lfact,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2483 objgraph, pdeps, pi, primes, ptags, which
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2484 - Added a bunch of socket demos
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2485 - Doubled the speed of ptags
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2486 - Added new stdwin demos: microedit, miniedit
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2487 - Added a windowing interface to the Python interpreter: python (most
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2488 useful on the Mac)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2489 - Added a browser for Emacs info files: demo/stdwin/ibrowse
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2490 (yes, I plan to put all STDWIN and Python documentation in texinfo
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2491 form in the future)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2492
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2493
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2494 5. Other changes to the distribution
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2495
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2496 - An Emacs Lisp file "python.el" is provided to facilitate editing
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2497 Python programs in GNU Emacs (slightly improved since posted to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2498 gnu.emacs.sources)
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2499 - Some info on writing an extension in C is provided
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2500 - Some info on building Python on non-UNIX platforms is provided
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2501
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2502
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2503 =====================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2504 ==> Release 0.9.1 (February 1991) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2505 =====================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2506
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2507 - Micro changes only
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2508 - Added file "patchlevel.h"
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2509
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2510
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2511 =====================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2512 ==> Release 0.9.0 (February 1991) <==
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2513 =====================================
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2514
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2515 Original posting to alt.sources.