Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 1 | ===================================== |
| 2 | ==> Release 1.3 (13 October 1995) <== |
| 3 | ===================================== |
Guido van Rossum | 635649f | 1994-11-10 23:04:51 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 5 | Major change |
| 6 | ============ |
Guido van Rossum | 635649f | 1994-11-10 23:04:51 +0000 | [diff] [blame] | 7 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 8 | Two words: Keyword Arguments. See the first section of Chapter 12 of |
| 9 | the Tutorial. |
Guido van Rossum | 635649f | 1994-11-10 23:04:51 +0000 | [diff] [blame] | 10 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 11 | (The rest of this file is textually the same as the remaining sections |
| 12 | of that chapter.) |
Guido van Rossum | 0082c1a | 1995-04-10 11:52:44 +0000 | [diff] [blame] | 13 | |
Guido van Rossum | 635649f | 1994-11-10 23:04:51 +0000 | [diff] [blame] | 14 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 15 | Changes to the WWW and Internet tools |
| 16 | ===================================== |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 17 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 18 | The "htmllib" module has been rewritten in an incompatible fashion. |
| 19 | The new version is considerably more complete (HTML 2.0 except forms, |
| 20 | but including all ISO-8859-1 entity definitions), and easy to use. |
| 21 | Small changes to "sgmllib" have also been made, to better match the |
| 22 | tokenization of HTML as recognized by other web tools. |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 23 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 24 | A new module "formatter" has been added, for use with the new |
| 25 | "htmllib" module. |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 26 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 27 | The "urllib"and "httplib" modules have been changed somewhat to allow |
| 28 | overriding unknown URL types and to support authentication. They now |
| 29 | use "mimetools.Message" instead of "rfc822.Message" to parse headers. |
| 30 | The "endrequest()" method has been removed from the HTTP class since |
| 31 | it breaks the interaction with some servers. |
Guido van Rossum | ac5a4e3 | 1994-10-11 15:04:57 +0000 | [diff] [blame] | 32 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 33 | The "rfc822.Message" class has been changed to allow a flag to be |
| 34 | passed in that says that the file is unseekable. |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 35 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 36 | The "ftplib" module has been fixed to be (hopefully) more robust on |
| 37 | Linux. |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 38 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 39 | Several new operations that are optionally supported by servers have |
| 40 | been added to "nntplib": "xover", "xgtitle", "xpath" and "date". |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 41 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 42 | Other Language Changes |
| 43 | ====================== |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 44 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 45 | The "raise" statement now takes an optional argument which specifies |
| 46 | the traceback to be used when printing the exception's stack trace. |
| 47 | This must be a traceback object, such as found in "sys.exc_traceback". |
| 48 | When omitted or given as "None", the old behavior (to generate a stack |
| 49 | trace entry for the current stack frame) is used. |
Guido van Rossum | 0082c1a | 1995-04-10 11:52:44 +0000 | [diff] [blame] | 50 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 51 | The tokenizer is now more tolerant of alien whitespace. Control-L in |
| 52 | the leading whitespace of a line resets the column number to zero, |
| 53 | while Control-R just before the end of the line is ignored. |
Guido van Rossum | 0082c1a | 1995-04-10 11:52:44 +0000 | [diff] [blame] | 54 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 55 | Changes to Built-in Operations |
| 56 | ============================== |
Guido van Rossum | 0082c1a | 1995-04-10 11:52:44 +0000 | [diff] [blame] | 57 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 58 | For file objects, "f.read(0)" and "f.readline(0)" now return an empty |
| 59 | string rather than reading an unlimited number of bytes. For the |
| 60 | latter, omit the argument altogether or pass a negative value. |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 62 | A new system variable, "sys.platform", has been added. It specifies |
| 63 | the current platform, e.g. "sunos5" or "linux1". |
Guido van Rossum | 061f182 | 1994-10-06 16:03:45 +0000 | [diff] [blame] | 64 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 65 | The built-in functions "input()" and "raw_input()" now use the GNU |
| 66 | readline library when it has been configured (formerly, only |
| 67 | interactive input to the interpreter itself was read using GNU |
| 68 | readline). The GNU readline library provides elaborate line editing |
| 69 | and history. The Python debugger ("pdb") is the first beneficiary of |
| 70 | this change. |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 71 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 72 | Two new built-in functions, "globals()" and "locals()", provide access |
| 73 | to dictionaries containming current global and local variables, |
| 74 | respectively. (These augment rather than replace "vars()", which |
| 75 | returns the current local variables when called without an argument, |
| 76 | and a module's global variables when called with an argument of type |
| 77 | module.) |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 78 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 79 | The built-in function "compile()" now takes a third possible value for |
| 80 | the kind of code to be compiled: specifying "'single'" generates code |
| 81 | for a single interactive statement, which prints the output of |
| 82 | expression statements that evaluate to something else than "None". |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 83 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 84 | Library Changes |
| 85 | =============== |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 86 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 87 | There are new module "ni" and "ihooks" that support importing modules |
| 88 | with hierarchical names such as "A.B.C". This is enabled by writing |
| 89 | "import ni; ni.ni()" at the very top of the main program. These |
| 90 | modules are amply documented in the Python source. |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 91 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 92 | The module "rexec" has been rewritten (incompatibly) to define a class |
| 93 | and to use "ihooks". |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 94 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 95 | The "string.split()" and "string.splitfields()" functions are now the |
| 96 | same function (the presence or absence of the second argument |
| 97 | determines which operation is invoked); similar for "string.join()" |
| 98 | and "string.joinfields()". |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 99 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 100 | The "Tkinter" module and its helper "Dialog" have been revamped to use |
| 101 | keyword arguments. Tk 4.0 is now the standard. A new module |
| 102 | "FileDialog" has been added which implements standard file selection |
| 103 | dialogs. |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 104 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 105 | The optional built-in modules "dbm" and "gdbm" are more coordinated |
| 106 | --- their "open()" functions now take the same values for their "flag" |
| 107 | argument, and the "flag" and "mode" argument have default values (to |
| 108 | open the database for reading only, and to create the database with |
| 109 | mode "0666" minuse the umask, respectively). The memory leaks have |
| 110 | finally been fixed. |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 111 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 112 | A new dbm-like module, "bsddb", has been added, which uses the BSD DB |
| 113 | package's hash method. |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 114 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 115 | A portable (though slow) dbm-clone, implemented in Python, has been |
| 116 | added for systems where none of the above is provided. It is aptly |
| 117 | dubbed "dumbdbm". |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 118 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 119 | The module "anydbm" provides a unified interface to "bsddb", "gdbm", |
| 120 | "dbm", and "dumbdbm", choosing the first one available. |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 121 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 122 | A new extension module, "binascii", provides a variety of operations |
| 123 | for conversion of text-encoded binary data. |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 124 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 125 | There are three new or rewritten companion modules implemented in |
| 126 | Python that can encode and decode the most common such formats: "uu" |
| 127 | (uuencode), "base64" and "binhex". |
Guido van Rossum | 04cba5b | 1995-03-09 14:44:51 +0000 | [diff] [blame] | 128 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 129 | A module to handle the MIME encoding quoted-printable has also been |
| 130 | added: "quopri". |
| 131 | |
| 132 | The parser module (which provides an interface to the Python parser's |
| 133 | abstract syntax trees) has been rewritten (incompatibly) by Fred |
| 134 | Drake. It now lets you change the parse tree and compile the result! |
| 135 | |
Guido van Rossum | bf032a9 | 1995-10-11 19:28:39 +0000 | [diff] [blame] | 136 | The \code{syslog} module has been upgraded and documented. |
| 137 | |
Guido van Rossum | 5e639d4 | 1995-10-11 18:03:13 +0000 | [diff] [blame] | 138 | Other Changes |
| 139 | ============= |
| 140 | |
| 141 | The dynamic module loader recognizes the fact that different filenames |
| 142 | point to the same shared library and loads the library only once, so |
| 143 | you can have a single shared library that defines multiple modules. |
| 144 | (SunOS / SVR4 style shared libraries only.) |
| 145 | |
| 146 | Jim Fulton's ``abstract object interface'' has been incorporated into |
| 147 | the run-time API. For more detailes, read the files |
| 148 | "Include/abstract.h" and "Objects/abstract.c". |
| 149 | |
| 150 | The Macintosh version is much more robust now. |
| 151 | |
| 152 | Numerous things I have forgotten or that are so obscure no-one will |
| 153 | notice them anyway :-) |