Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 1 | Python history |
| 2 | -------------- |
| 3 | |
| 4 | This file contains the release messages for previous Python releases |
| 5 | (slightly edited to adapt them to the format of this file). As you |
| 6 | read on you go back to the dark ages of Python's history. |
| 7 | |
Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 8 | |
Guido van Rossum | c30e95f | 1996-07-30 18:53:51 +0000 | [diff] [blame] | 9 | ===================================== |
Guido van Rossum | 821a558 | 1997-05-23 04:05:31 +0000 | [diff] [blame^] | 10 | ==> Release 1.4 (October 25 1996) <== |
| 11 | ===================================== |
| 12 | |
| 13 | (Starting in reverse chronological order:) |
| 14 | |
| 15 | - Changed disclaimer notice. |
| 16 | |
| 17 | - Added SHELL=/bin/sh to Misc/Makefile.pre.in -- some Make versions |
| 18 | default to the user's login shell. |
| 19 | |
| 20 | - In Lib/tkinter/Tkinter.py, removed bogus binding of <Delete> in Text |
| 21 | widget, and bogus bspace() function. |
| 22 | |
| 23 | - In Lib/cgi.py, bumped __version__ to 2.0 and restored a truncated |
| 24 | paragraph. |
| 25 | |
| 26 | - Fixed the NT Makefile (PC/vc40.mak) for VC 4.0 to set /MD for all |
| 27 | subprojects, and to remove the (broken) experimental NumPy |
| 28 | subprojects. |
| 29 | |
| 30 | - In Lib/py_compile.py, cast mtime to long() so it will work on Mac |
| 31 | (where os.stat() returns mtimes as floats.) |
| 32 | - Set self.rfile unbuffered (like self.wfile) in SocketServer.py, to |
| 33 | fix POST in CGIHTTPServer.py. |
| 34 | |
| 35 | - Version 2.83 of Misc/python-mode.el for Emacs is included. |
| 36 | |
| 37 | - In Modules/regexmodule.c, fixed symcomp() to correctly handle a new |
| 38 | group starting immediately after a group tag. |
| 39 | |
| 40 | - In Lib/SocketServer.py, changed the mode for rfile to unbuffered. |
| 41 | |
| 42 | - In Objects/stringobject.c, fixed the compare function to do the |
| 43 | first char comparison in unsigned mode, for consistency with the way |
| 44 | other characters are compared by memcmp(). |
| 45 | |
| 46 | - In Lib/tkinter/Tkinter.py, fixed Scale.get() to support floats. |
| 47 | |
| 48 | - In Lib/urllib.py, fix another case where openedurl wasn't set. |
| 49 | |
| 50 | (XXX Sorry, the rest is in totally random order. No time to fix it.) |
| 51 | |
| 52 | - SyntaxError exceptions detected during code generation |
| 53 | (e.g. assignment to an expression) now include a line number. |
| 54 | |
| 55 | - Don't leave trailing / or \ in script directory inserted in front of |
| 56 | sys.path. |
| 57 | |
| 58 | - Added a note to Tools/scripts/classfix.py abouts its historical |
| 59 | importance. |
| 60 | |
| 61 | - Added Misc/Makefile.pre.in, a universal Makefile for extensions |
| 62 | built outside the distribution. |
| 63 | |
| 64 | - Rewritten Misc/faq2html.py, by Ka-Ping Yee. |
| 65 | |
| 66 | - Install shared modules with mode 555 (needed for performance on some |
| 67 | platforms). |
| 68 | |
| 69 | - Some changes to standard library modules to avoid calling append() |
| 70 | with more than one argument -- while supported, this should be |
| 71 | outlawed, and I don't want to set a bad example. |
| 72 | |
| 73 | - bdb.py (and hence pdb.py) supports calling run() with a code object |
| 74 | instead of a code string. |
| 75 | |
| 76 | - Fixed an embarrassing bug cgi.py which prevented correct uploading |
| 77 | of binary files from Netscape (which doesn't distinguish between |
| 78 | binary and text files). Also added dormant logging support, which |
| 79 | makes it easier to debug the cgi module itself. |
| 80 | |
| 81 | - Added default writer to constructor of NullFormatter class. |
| 82 | |
| 83 | - Use binary mode for socket.makefile() calls in ftplib.py. |
| 84 | |
| 85 | - The ihooks module no longer "installs" itself upon import -- this |
| 86 | was an experimental feature that helped ironing out some bugs but that |
| 87 | slowed down code that imported it without the need to install it |
| 88 | (e.g. the rexec module). Also close the file in some cases and add |
| 89 | the __file__ attribute to loaded modules. |
| 90 | |
| 91 | - The test program for mailbox.py is now more useful. |
| 92 | |
| 93 | - Added getparamnames() to Message class in mimetools.py -- it returns |
| 94 | the names of parameters to the content-type header. |
| 95 | |
| 96 | - Fixed a typo in ni that broke the loop stripping "__." from names. |
| 97 | |
| 98 | - Fix sys.path[0] for scripts run via pdb.py's new main program. |
| 99 | |
| 100 | - profile.py can now also run a script, like pdb. |
| 101 | |
| 102 | - Fix a small bug in pyclbr -- don't add names starting with _ when |
| 103 | emulating from ... import *. |
| 104 | |
| 105 | - Fixed a series of embarrassing typos in rexec's handling of standard |
| 106 | I/O redirection. Added some more "safe" built-in modules: cmath, |
| 107 | errno, operator. |
| 108 | |
| 109 | - Fixed embarrassing typo in shelve.py. |
| 110 | |
| 111 | - Added SliceType and EllipsisType to types.py. |
| 112 | |
| 113 | - In urllib.py, added handling for error 301 (same as 302); added |
| 114 | geturl() method to get the URL after redirection. |
| 115 | |
| 116 | - Fixed embarrassing typo in xdrlib.py. Also fixed typo in Setup.in |
| 117 | for _xdrmodule.c and removed redundant #include from _xdrmodule.c. |
| 118 | |
| 119 | - Fixed bsddbmodule.c to add binary mode indicator on platforms that |
| 120 | have it. This should make it working on Windows NT. |
| 121 | |
| 122 | - Changed last uses of #ifdef NT to #ifdef MS_WINDOWS or MS_WIN32, |
| 123 | whatever applies. Also rationalized some other tests for various MS |
| 124 | platforms. |
| 125 | |
| 126 | - Added the sources for the NT installer script used for Python |
| 127 | 1.4beta3. Not tested with this release, but better than nothing. |
| 128 | |
| 129 | - A compromise in pickle's defenses against Trojan horses: a |
| 130 | user-defined function is now okay where a class is expected. A |
| 131 | built-in function is not okay, to prevent pickling something that |
| 132 | will execute os.system("rm -f *") when unpickling. |
| 133 | |
| 134 | - dis.py will print the name of local variables referenced by local |
| 135 | load/store/delete instructions. |
| 136 | |
| 137 | - Improved portability of SimpleHTTPServer module to non-Unix |
| 138 | platform. |
| 139 | |
| 140 | - The thread.h interface adds an extra argument to down_sema(). This |
| 141 | only affects other C code that uses thread.c; the Python thread module |
| 142 | doesn't use semaphores (which aren't provided on all platforms where |
| 143 | Python threads are supported). Note: on NT, this change is not |
| 144 | implemented. |
| 145 | |
| 146 | - Fixed some typos in abstract.h; corrected signature of |
| 147 | PyNumber_Coerce, added PyMapping_DelItem. Also fixed a bug in |
| 148 | abstract.c's PyObject_CallMethod(). |
| 149 | |
| 150 | - apply(classname, (), {}) now works even if the class has no |
| 151 | __init__() method. |
| 152 | |
| 153 | - Implemented complex remainder and divmod() (these would dump core!). |
| 154 | Conversion of complex numbers to int, long int or float now raises an |
| 155 | exception, since there is no meaningful way to do it without losing |
| 156 | information. |
| 157 | |
| 158 | - Fixed bug in built-in complex() function which gave the wrong result |
| 159 | for two real arguments. |
| 160 | |
| 161 | - Change the hash algorithm for strings -- the multiplier is now |
| 162 | 1000003 instead of 3, which gives better spread for short strings. |
| 163 | |
| 164 | - New default path for Windows NT, the registry structure now supports |
| 165 | default paths for different install packages. (Mark Hammond -- the |
| 166 | next PythonWin release will use this.) |
| 167 | |
| 168 | - Added more symbols to the python_nt.def file. |
| 169 | |
| 170 | - When using GNU readline, set rl_readline_name to "python". |
| 171 | |
| 172 | - The Ellipses built-in name has been renamed to Ellipsis -- this is |
| 173 | the correct singular form. Thanks to Ka-Ping Yee, who saved us from |
| 174 | eternal embarrassment. |
| 175 | |
| 176 | - Bumped the PYTHON_API_VERSION to 1006, due to the Ellipses -> |
| 177 | Ellipsis name change. |
| 178 | |
| 179 | - Updated the library reference manual. Added documentation of |
| 180 | restricted mode (rexec, Bastion) and the formatter module (for use |
| 181 | with the htmllib module). Fixed the documentation of htmllib |
| 182 | (finally). |
| 183 | |
| 184 | - The reference manual is now maintained in FrameMaker. |
| 185 | |
| 186 | - Upgraded scripts Doc/partparse.py and Doc/texi2html.py. |
| 187 | |
| 188 | - Slight improvements to Doc/Makefile. |
| 189 | |
| 190 | - Added fcntl.lockf(). This should be used for Unix file locking |
| 191 | instead of the posixfile module; lockf() is more portable. |
| 192 | |
| 193 | - The getopt module now supports long option names, thanks to Lars |
| 194 | Wizenius. |
| 195 | |
| 196 | - Plenty of changes to Tkinter and Canvas, mostly due to Fred Drake |
| 197 | and Nils Fischbeck. |
| 198 | |
| 199 | - Use more bits of time.time() in whrandom's default seed(). |
| 200 | |
| 201 | - Performance hack for regex module's regs attribute. |
| 202 | |
| 203 | - Don't close already closed socket in socket module. |
| 204 | |
| 205 | - Correctly handle separators containing embedded nulls in |
| 206 | strop.split, strop.find and strop.rfind. Also added more detail to |
| 207 | error message for strop.atoi and friends. |
| 208 | |
| 209 | - Moved fallback definition for hypot() to Python/hypot.c. |
| 210 | |
| 211 | - Added fallback definition for strdup, in Python/strdup.c. |
| 212 | |
| 213 | - Fixed some bugs where a function would return 0 to indicate an error |
| 214 | where it should return -1. |
| 215 | |
| 216 | - Test for error returned by time.localtime(), and rationalized its MS |
| 217 | tests. |
| 218 | |
| 219 | - Added Modules/Setup.local file, which is processed after Setup. |
| 220 | |
| 221 | - Corrected bug in toplevel Makefile.in -- execution of regen script |
| 222 | would not use the right PATH and PYTHONPATH. |
| 223 | |
| 224 | - Various and sundry NeXT configuration changes (sigh). |
| 225 | |
| 226 | - Support systems where libreadline needs neither termcap nor curses. |
| 227 | |
| 228 | - Improved ld_so_aix script and python.exp file (for AIX). |
| 229 | |
| 230 | - More stringent test for working <stdarg.h> in configure script. |
| 231 | |
| 232 | - Removed Demo/www subdirectory -- it was totally out of date. |
| 233 | |
| 234 | - Improved demos and docs for Fred Drake's parser module; fixed one |
| 235 | typo in the module itself. |
| 236 | |
| 237 | |
| 238 | ========================================= |
| 239 | ==> Release 1.4beta3 (August 26 1996) <== |
| 240 | ========================================= |
| 241 | |
| 242 | |
| 243 | (XXX This is less readable that it should. I promise to restructure |
| 244 | it for the final 1.4 release.) |
| 245 | |
| 246 | |
| 247 | What's new in 1.4beta3 (since beta2)? |
| 248 | ------------------------------------- |
| 249 | |
| 250 | - Name mangling to implement a simple form of class-private variables. |
| 251 | A name of the form "__spam" can't easily be used outside the class. |
| 252 | (This was added in 1.4beta3, but left out of the 1.4beta3 release |
| 253 | message.) |
| 254 | |
| 255 | - In urllib.urlopen(): HTTP URLs containing user:passwd@host are now |
| 256 | handled correctly when using a proxy server. |
| 257 | |
| 258 | - In ntpath.normpath(): don't truncate to 8+3 format. |
| 259 | |
| 260 | - In mimetools.choose_boundary(): don't die when getuid() or getpid() |
| 261 | aren't defined. |
| 262 | |
| 263 | - Module urllib: some optimizations to (un)quoting. |
| 264 | |
| 265 | - New module MimeWriter for writing MIME documents. |
| 266 | |
| 267 | - More changes to formatter module. |
| 268 | |
| 269 | - The freeze script works once again and is much more robust (using |
| 270 | sys.prefix etc.). It also supports a -o option to specify an |
| 271 | output directory. |
| 272 | |
| 273 | - New module whichdb recognizes dbm, gdbm and bsddb/dbhash files. |
| 274 | |
| 275 | - The Doc/Makefile targets have been reorganized somewhat to remove the |
| 276 | insistence on always generating PostScript. |
| 277 | |
| 278 | - The texinfo to html filter (Doc/texi2html.py) has been improved somewhat. |
| 279 | |
| 280 | - "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing |
| 281 | name conflict on the Mac. |
| 282 | |
| 283 | - Linking a module compiled with a different setting for Py_TRACE_REFS now |
| 284 | generates a linker error rather than a core dump. |
| 285 | |
| 286 | - The cgi module has a new convenience function print_exception(), which |
| 287 | formats a python exception using HTML. It also fixes a bug in the |
| 288 | compatibility code and adds a dubious feature which makes it possible to |
| 289 | have two query strings, one in the URL and one in the POST data. |
| 290 | |
| 291 | - A subtle change in the unpickling of class instances makes it possible |
| 292 | to unpickle in restricted execution mode, where the __dict__ attribute is |
| 293 | not available (but setattr() is). |
| 294 | |
| 295 | - Documentation for os.path.splitext() (== posixpath.splitext()) has been |
| 296 | cleared up. It splits at the *last* dot. |
| 297 | |
| 298 | - posixfile locking is now also correctly supported on AIX. |
| 299 | |
| 300 | - The tempfile module once again honors an initial setting of tmpdir. It |
| 301 | now works on Windows, too. |
| 302 | |
| 303 | - The traceback module has some new functions to extract, format and print |
| 304 | the active stack. |
| 305 | |
| 306 | - Some translation functions in the urllib module have been made a little |
| 307 | less sluggish. |
| 308 | |
| 309 | - The addtag_* methods for Canvas widgets in Tkinter as well as in the |
| 310 | separate Canvas class have been fixed so they actually do something |
| 311 | meaningful. |
| 312 | |
| 313 | - A tiny _test() function has been added to Tkinter.py. |
| 314 | |
| 315 | - A generic Makefile for dynamically loaded modules is provided in the Misc |
| 316 | subdirectory (Misc/gMakefile). |
| 317 | |
| 318 | - A new version of python-mode.el for Emacs is provided. See |
| 319 | http://www.python.org/ftp/emacs/pmdetails.html for details. The |
| 320 | separate file pyimenu.el is no longer needed, imenu support is folded |
| 321 | into python-mode.el. |
| 322 | |
| 323 | - The configure script can finally correctly find the readline library in a |
| 324 | non-standard location. The LDFLAGS variable is passed on the the Makefiles |
| 325 | from the configure script. |
| 326 | |
| 327 | - Shared libraries are now installed as programs (i.e. with executable |
| 328 | permission). This is required on HP-UX and won't hurt on other systems. |
| 329 | |
| 330 | - The objc.c module is no longer part of the distribution. Objective-C |
| 331 | support may become available as contributed software on the ftp site. |
| 332 | |
| 333 | - The sybase module is no longer part of the distribution. A much |
| 334 | improved sybase module is available as contributed software from the |
| 335 | ftp site. |
| 336 | |
| 337 | - _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and |
| 338 | Mac (don't use unpatched Tcl/Tk!). The default line in the Setup.in file |
| 339 | now links with Tcl 7.5 / Tk 4.1 rather than 7.4/4.0. |
| 340 | |
| 341 | - In Setup, you can now write "*shared*" instead of "*noconfig*", and you |
| 342 | can use *.so and *.sl as shared libraries. |
| 343 | |
| 344 | - Some more fidgeting for AIX shared libraries. |
| 345 | |
| 346 | - The mpz module is now compatible with GMP 2.x. (Not tested by me.) |
| 347 | (Note -- a complete replacement by Niels Mo"ller, called gpmodule, is |
| 348 | available from the contrib directory on the ftp site.) |
| 349 | |
| 350 | - A warning is written to sys.stderr when a __del__ method raises an |
| 351 | exception (formerly, such exceptions were completely ignored). |
| 352 | |
| 353 | - The configure script now defines HAVE_OLD_CPP if the C preprocessor is |
| 354 | incapable of ANSI style token concatenation and stringification. |
| 355 | |
| 356 | - All source files (except a few platform specific modules) are once again |
| 357 | compatible with K&R C compilers as well as ANSI compilers. In particular, |
| 358 | ANSI-isms have been removed or made conditional in complexobject.c, |
| 359 | getargs.c and operator.c. |
| 360 | |
| 361 | - The abstract object API has three new functions, PyObject_DelItem, |
| 362 | PySequence_DelItem, and PySequence_DelSlice. |
| 363 | |
| 364 | - The operator module has new functions delitem and delslice, and the |
| 365 | functions "or" and "and" are renamed to "or_" and "and_" (since "or" and |
| 366 | "and" are reserved words). ("__or__" and "__and__" are unchanged.) |
| 367 | |
| 368 | - The environment module is no longer supported; putenv() is now a function |
| 369 | in posixmodule (also under NT). |
| 370 | |
| 371 | - Error in filter(<function>, "") has been fixed. |
| 372 | |
| 373 | - Unrecognized keyword arguments raise TypeError, not KeyError. |
| 374 | |
| 375 | - Better portability, fewer bugs and memory leaks, fewer compiler warnings, |
| 376 | some more documentation. |
| 377 | |
| 378 | - Bug in float power boundary case (0.0 to the negative integer power) |
| 379 | fixed. |
| 380 | |
| 381 | - The test of negative number to the float power has been moved from the |
| 382 | built-in pow() functin to floatobject.c (so complex numbers can yield the |
| 383 | correct result). |
| 384 | |
| 385 | - The bug introduced in beta2 where shared libraries loaded (using |
| 386 | dlopen()) from the current directory would fail, has been fixed. |
| 387 | |
| 388 | - Modules imported as shared libraries now also have a __file__ attribute, |
| 389 | giving the filename from which they were loaded. The only modules without |
| 390 | a __file__ attribute now are built-in modules. |
| 391 | |
| 392 | - On the Mac, dynamically loaded modules can end in either ".slb" or |
| 393 | ".<platform>.slb" where <platform> is either "CFM68K" or "ppc". The ".slb" |
| 394 | extension should only be used for "fat" binaries. |
| 395 | |
| 396 | - C API addition: marshal.c now supports |
| 397 | PyMarshal_WriteObjectToString(object). |
| 398 | |
| 399 | - C API addition: getargs.c now supports |
| 400 | PyArg_ParseTupleAndKeywords(args, kwdict, format, kwnames, ...) |
| 401 | to parse keyword arguments. |
| 402 | |
| 403 | - The PC versioning scheme (sys.winver) has changed once again. the |
| 404 | version number is now "<digit>.<digit>.<digit>.<apiversion>", where the |
| 405 | first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4, |
| 406 | "1.4.1" for Python 1.4.1 -- the beta level is not included) and |
| 407 | <apiversion> is the four-digit PYTHON_API_VERSION (currently 1005). |
| 408 | |
| 409 | - h2py.py accepts whitespace before the # in CPP directives |
| 410 | |
| 411 | - On Solaris 2.5, it should now be possible to use either Posix threads or |
| 412 | Solaris threads (XXX: how do you select which is used???). (Note: the |
| 413 | Python pthreads interface doesn't fully support semaphores yet -- anyone |
| 414 | care to fix this?) |
| 415 | |
| 416 | - Thread support should now work on AIX, using either DCE threads or |
| 417 | pthreads. |
| 418 | |
| 419 | - New file Demo/sockets/unicast.py |
| 420 | |
| 421 | - Working Mac port, with CFM68K support, with Tk 4.1 support (though not |
| 422 | both) (XXX) |
| 423 | |
| 424 | - New project setup for PC port, now compatible with PythonWin, with |
| 425 | _tkinter and NumPy support (XXX) |
| 426 | |
| 427 | - New module site.py (XXX) |
| 428 | |
| 429 | - New module xdrlib.py and optional support module _xdrmodule.c (XXX) |
| 430 | |
| 431 | - parser module adapted to new grammar, complete w/ Doc & Demo (XXX) |
| 432 | |
| 433 | - regen script fixed (XXX) |
| 434 | |
| 435 | - new machdep subdirectories Lib/{aix3,aix4,next3_3,freebsd2,linux2} (XXX) |
| 436 | |
| 437 | - testall now also tests math module (XXX) |
| 438 | |
| 439 | - string.atoi c.s. now raise an exception for an empty input string. |
| 440 | |
| 441 | - At last, it is no longer necessary to define HAVE_CONFIG_H in order to |
| 442 | have config.h included at various places. |
| 443 | |
| 444 | - Unrecognized keyword arguments now raise TypeError rather than KeyError. |
| 445 | |
| 446 | - The makesetup script recognizes files with extension .so or .sl as |
| 447 | (shared) libraries. |
| 448 | |
| 449 | - 'access' is no longer a reserved word, and all code related to its |
| 450 | implementation is gone (or at least #ifdef'ed out). This should make |
| 451 | Python a little speedier too! |
| 452 | |
| 453 | - Performance enhancements suggested by Sjoerd Mullender. This includes |
| 454 | the introduction of two new optional function pointers in type object, |
| 455 | getattro and setattro, which are like getattr and setattr but take a |
| 456 | string object instead of a C string pointer. |
| 457 | |
| 458 | - New operations in string module: lstrip(s) and rstrip(s) strip whitespace |
| 459 | only on the left or only on the right, A new optional third argument to |
| 460 | split() specifies the maximum number of separators honored (so |
| 461 | splitfields(s, sep, n) returns a list of at most n+1 elements). (Since |
| 462 | 1.3, splitfields(s, None) is totally equivalent to split(s).) |
| 463 | string.capwords() has an optional second argument specifying the |
| 464 | separator (which is passed to split()). |
| 465 | |
| 466 | - regsub.split() has the same addition as string.split(). regsub.splitx(s, |
| 467 | sep, maxsep) implements the functionality that was regsub.split(s, 1) in |
| 468 | 1.4beta2 (return a list containing the delimiters as well as the words). |
| 469 | |
| 470 | - Final touch for AIX loading, rewritten Misc/AIX-NOTES. |
| 471 | |
| 472 | - In Modules/_tkinter.c, when using Tk 4.1 or higher, use className |
| 473 | argument to _tkinter.create() to set Tcl's argv0 variable, so X |
| 474 | resources use the right resource class again. |
| 475 | |
| 476 | - Add #undef fabs to Modules/mathmodule.c for macintosh. |
| 477 | |
| 478 | - Added some macro renames for AIX in Modules/operator.c. |
| 479 | |
| 480 | - Removed spurious 'E' from Doc/liberrno.tex. |
| 481 | |
| 482 | - Got rid of some cruft in Misc/ (dlMakefile, pyimenu.el); added new |
| 483 | Misc/gMakefile and new version of Misc/python-mode.el. |
| 484 | |
| 485 | - Fixed typo in Lib/ntpath.py (islink has "return false" which gives a |
| 486 | NameError). |
| 487 | |
| 488 | - Added missing "from types import *" to Lib/tkinter/Canvas.py. |
| 489 | |
| 490 | - Added hint about using default args for __init__ to pickle docs. |
| 491 | |
| 492 | - Corrected typo in Inclide/abstract.h: PySequence_Lenth -> |
| 493 | PySequence_Length. |
| 494 | |
| 495 | - Some improvements to Doc/texi2html.py. |
| 496 | |
| 497 | - In Python/import.c, Cast unsigned char * in struct _frozen to char * |
| 498 | in calls to rds_object(). |
| 499 | |
| 500 | - In doc/ref4.tex, added note about scope of lambda bodies. |
| 501 | |
| 502 | What's new in 1.4beta2 (since beta1)? |
| 503 | ------------------------------------- |
| 504 | |
| 505 | - Portability bug in the md5.h header solved. |
| 506 | |
| 507 | - The PC build procedure now really works, and sets sys.platform to a |
| 508 | meaningful value (a few things were botched in beta 1). Lib/dos_8x3 |
| 509 | is now a standard part of the distribution (alas). |
| 510 | |
| 511 | - More improvements to the installation procedure. Typing "make install" |
| 512 | now inserts the version number in the pathnames of almost everything |
| 513 | installed, and creates the machine dependent modules (FCNTL.py etc.) if not |
| 514 | supplied by the distribution. (XXX There's still a problem with the latter |
| 515 | because the "regen" script requires that Python is installed. Some manual |
| 516 | intervention may still be required.) (This has been fixed in 1.4beta3.) |
| 517 | |
| 518 | - New modules: errno, operator (XXX). |
| 519 | |
| 520 | - Changes for use with Numerical Python: builtin function slice() and |
| 521 | Ellipses object, and corresponding syntax: |
| 522 | |
| 523 | x[lo:hi:stride] == x[slice(lo, hi, stride)] |
| 524 | x[a, ..., z] == x[(a, Ellipses, z)] |
| 525 | |
| 526 | - New documentation for errno and cgi mdoules. |
| 527 | |
| 528 | - The directory containing the script passed to the interpreter is |
| 529 | inserted in from of sys.path; "." is no longer a default path |
| 530 | component. |
| 531 | |
| 532 | - Optional third string argument to string.translate() specifies |
| 533 | characters to delete. New function string.maketrans() creates a |
| 534 | translation table for translate() or for regex.compile(). |
| 535 | |
| 536 | - Module posix (and hence module os under Unix) now supports putenv(). |
| 537 | Moreover, module os is enhanced so that if putenv() is supported, |
| 538 | assignments to os.environ entries make the appropriate putenv() call. |
| 539 | (XXX the putenv() implementation can leak a small amount of memory per |
| 540 | call.) |
| 541 | |
| 542 | - pdb.py can now be invoked from the command line to debug a script: |
| 543 | python pdb.py <script> <arg> ... |
| 544 | |
| 545 | - Much improved parseaddr() in rfc822. |
| 546 | |
| 547 | - In cgi.py, you can now pass an alternative value for environ to |
| 548 | nearly all functions. |
| 549 | |
| 550 | - You can now assign to instance variables whose name begins and ends |
| 551 | with '__'. |
| 552 | |
| 553 | - New version of Fred Drake's parser module and associates (token, |
| 554 | symbol, AST). |
| 555 | |
| 556 | - New PYTHON_API_VERSION value and .pyc file magic number (again!). |
| 557 | |
| 558 | - The "complex" internal structure type is now called "Py_complex" to |
| 559 | avoid name conflicts. |
| 560 | |
| 561 | - Numerous small bugs fixed. |
| 562 | |
| 563 | - Slight pickle speedups. |
| 564 | |
| 565 | - Some slight speedups suggested by Sjoerd (more coming in 1.4 final). |
| 566 | |
| 567 | - NeXT portability mods by Bill Bumgarner integrated. |
| 568 | |
| 569 | - Modules regexmodule.c, bsddbmodule.c and xxmodule.c have been |
| 570 | converted to new naming style. |
| 571 | |
| 572 | |
| 573 | What's new in 1.4beta1 (since 1.3)? |
| 574 | ----------------------------------- |
| 575 | |
| 576 | - Added sys.platform and sys.exec_platform for Bill Janssen. |
| 577 | |
| 578 | - Installation has been completely overhauled. "make install" now installs |
| 579 | everything, not just the python binary. Installation uses the install-sh |
| 580 | script (borrowed from X11) to install each file. |
| 581 | |
| 582 | - New functions in the posix module: mkfifo, plock, remove (== unlink), |
| 583 | and ftruncate. More functions are also available under NT. |
| 584 | |
| 585 | - New function in the fcntl module: flock. |
| 586 | |
| 587 | - Shared library support for FreeBSD. |
| 588 | |
| 589 | - The --with-readline option can now be used without a DIRECTORY argument, |
| 590 | for systems where libreadline.* is in one of the standard places. It is |
| 591 | also possible for it to be a shared library. |
| 592 | |
| 593 | - The extension tkinter has been renamed to _tkinter, to avoid confusion |
| 594 | with Tkinter.py oncase insensitive file systems. It now supports Tk 4.1 as |
| 595 | well as 4.0. |
| 596 | |
| 597 | - Author's change of address from CWI in Amsterdam, The Netherlands, to |
| 598 | CNRI in Reston, VA, USA. |
| 599 | |
| 600 | - The math.hypot() function is now always available (if it isn't found in |
| 601 | the C math library, Python provides its own implementation). |
| 602 | |
| 603 | - The latex documentation is now compatible with latex2e, thanks to David |
| 604 | Ascher. |
| 605 | |
| 606 | - The expression x**y is now equivalent to pow(x, y). |
| 607 | |
| 608 | - The indexing expression x[a, b, c] is now equivalent to x[(a, b, c)]. |
| 609 | |
| 610 | - Complex numbers are now supported. Imaginary constants are written with |
| 611 | a 'j' or 'J' prefix, general complex numbers can be formed by adding a real |
| 612 | part to an imaginary part, like 3+4j. Complex numbers are always stored in |
| 613 | floating point form, so this is equivalent to 3.0+4.0j. It is also |
| 614 | possible to create complex numbers with the new built-in function |
| 615 | complex(re, [im]). For the footprint-conscious, complex number support can |
| 616 | be disabled by defining the symbol WITHOUT_COMPLEX. |
| 617 | |
| 618 | - New built-in function list() is the long-awaited counterpart of tuple(). |
| 619 | |
| 620 | - There's a new "cmath" module which provides the same functions as the |
| 621 | "math" library but with complex arguments and results. (There are very |
| 622 | good reasons why math.sqrt(-1) still raises an exception -- you have to use |
| 623 | cmath.sqrt(-1) to get 1j for an answer.) |
| 624 | |
| 625 | - The Python.h header file (which is really the same as allobjects.h except |
| 626 | it disables support for old style names) now includes several more files, |
| 627 | so you have to have fewer #include statements in the average extension. |
| 628 | |
| 629 | - The NDEBUG symbol is no longer used. Code that used to be dependent on |
| 630 | the presence of NDEBUG is now present on the absence of DEBUG. TRACE_REFS |
| 631 | and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG, |
| 632 | respectively. At long last, the source actually compiles and links without |
| 633 | errors when this symbol is defined. |
| 634 | |
| 635 | - Several symbols that didn't follow the new naming scheme have been |
| 636 | renamed (usually by adding to rename2.h) to use a Py or _Py prefix. There |
| 637 | are no external symbols left without a Py or _Py prefix, not even those |
| 638 | defined by sources that were incorporated from elsewhere (regexpr.c, |
| 639 | md5c.c). (Macros are a different story...) |
| 640 | |
| 641 | - There are now typedefs for the structures defined in config.c and |
| 642 | frozen.c. |
| 643 | |
| 644 | - New PYTHON_API_VERSION value and .pyc file magic number. |
| 645 | |
| 646 | - New module Bastion. (XXX) |
| 647 | |
| 648 | - Improved performance of StringIO module. |
| 649 | |
| 650 | - UserList module now supports + and * operators. |
| 651 | |
| 652 | - The binhex and binascii modules now actually work. |
| 653 | |
| 654 | - The cgi module has been almost totally rewritten and documented. |
| 655 | It now supports file upload and a new data type to handle forms more |
| 656 | flexibly. |
| 657 | |
| 658 | - The formatter module (for use with htmllib) has been overhauled (again). |
| 659 | |
| 660 | - The ftplib module now supports passive mode and has doc strings. |
| 661 | |
| 662 | - In (ideally) all places where binary files are read or written, the file |
| 663 | is now correctly opened in binary mode ('rb' or 'wb') so the code will work |
| 664 | on Mac or PC. |
| 665 | |
| 666 | - Dummy versions of os.path.expandvars() and expanduser() are now provided |
| 667 | on non-Unix platforms. |
| 668 | |
| 669 | - Module urllib now has two new functions url2pathname and pathname2url |
| 670 | which turn local filenames into "file:..." URLs using the same rules as |
| 671 | Netscape (why be different). it also supports urlretrieve() with a |
| 672 | pathname parameter, and honors the proxy environment variables (http_proxy |
| 673 | etc.). The URL parsing has been improved somewhat, too. |
| 674 | |
| 675 | - Micro improvements to urlparse. Added urlparse.urldefrag() which |
| 676 | removes a trailing ``#fragment'' if any. |
| 677 | |
| 678 | - The mailbox module now supports MH style message delimiters as well. |
| 679 | |
| 680 | - The mhlib module contains some new functionality: setcontext() to set the |
| 681 | current folder and parsesequence() to parse a sequence as commonly passed |
| 682 | to MH commands (e.g. 1-10 or last:5). |
| 683 | |
| 684 | - New module mimify for conversion to and from MIME format of email |
| 685 | messages. |
| 686 | |
| 687 | - Module ni now automatically installs itself when first imported -- this |
| 688 | is against the normal rule that modules should define classes and functions |
| 689 | but not invoke them, but appears more useful in the case that two |
| 690 | different, independent modules want to use ni's features. |
| 691 | |
| 692 | - Some small performance enhancements in module pickle. |
| 693 | |
| 694 | - Small interface change to the profile.run*() family of functions -- more |
| 695 | sensible handling of return values. |
| 696 | |
| 697 | - The officially registered Mac creator for Python files is 'Pyth'. This |
| 698 | replaces 'PYTH' which was used before but never registered. |
| 699 | |
| 700 | - Added regsub.capwords(). (XXX) |
| 701 | |
| 702 | - Added string.capwords(), string.capitalize() and string.translate(). |
| 703 | (XXX) |
| 704 | |
| 705 | - Fixed an interface bug in the rexec module: it was impossible to pass a |
| 706 | hooks instance to the RExec class. rexec now also supports the dynamic |
| 707 | loading of modules from shared libraries. Some other interfaces have been |
| 708 | added too. |
| 709 | |
| 710 | - Module rfc822 now caches the headers in a dictionary for more efficient |
| 711 | lookup. |
| 712 | |
| 713 | - The sgmllib module now understands a limited number of SGML "shorthands" |
| 714 | like <A/.../ for <A>...</A>. (It's not clear that this was a good idea...) |
| 715 | |
| 716 | - The tempfile module actually tries a number of different places to find a |
| 717 | usable temporary directory. (This was prompted by certain Linux |
| 718 | installations that appear to be missing a /usr/tmp directory.) [A bug in |
| 719 | the implementation that would ignore a pre-existing tmpdir global has been |
| 720 | fixed in beta3.] |
| 721 | |
| 722 | - Much improved and enhanved FileDialog module for Tkinter. |
| 723 | |
| 724 | - Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as |
| 725 | well as Tk 4.1). |
| 726 | |
| 727 | - New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and |
| 728 | s.dup(). Sockets now work correctly on Windows. On Windows, the built-in |
| 729 | extension is called _socket and a wrapper module win/socket.py provides |
| 730 | "makefile()" and "dup()" functionality. On Windows, the select module |
| 731 | works only with socket objects. |
| 732 | |
| 733 | - Bugs in bsddb module fixed (e.g. missing default argument values). |
| 734 | |
| 735 | - The curses extension now includes <ncurses.h> when available. |
| 736 | |
| 737 | - The gdbm module now supports opening databases in "fast" mode by |
| 738 | specifying 'f' as the second character or the mode string. |
| 739 | |
| 740 | - new variables sys.prefix and sys.exec_prefix pass corresponding |
| 741 | configuration options / Makefile variables to the Python programmer. |
| 742 | |
| 743 | - The ``new'' module now supports creating new user-defined classes as well |
| 744 | as instances thereof. |
| 745 | |
| 746 | - The soundex module now sports get_soundex() to get the soundex value for an |
| 747 | arbitrary string (formerly it would only do soundex-based string |
| 748 | comparison) as well as doc strings. |
| 749 | |
| 750 | - New object type "cobject" to safely wrap void pointers for passing them |
| 751 | between various extension modules. |
| 752 | |
| 753 | - More efficient computation of float**smallint. |
| 754 | |
| 755 | - The mysterious bug whereby "x.x" (two occurrences of the same |
| 756 | one-character name) typed from the commandline would sometimes fail |
| 757 | mysteriously. |
| 758 | |
| 759 | - The initialization of the readline function can now be invoked by a C |
| 760 | extension through PyOS_ReadlineInit(). |
| 761 | |
| 762 | - There's now an externally visible pointer PyImport_FrozenModules which |
| 763 | can be changed by an embedding application. |
| 764 | |
| 765 | - The argument parsing functions now support a new format character 'D' to |
| 766 | specify complex numbers. |
| 767 | |
| 768 | - Various memory leaks plugged and bugs fixed. |
| 769 | |
| 770 | - Improved support for posix threads (now that real implementations are |
| 771 | beginning to apepar). Still no fully functioning semaphores. |
| 772 | |
| 773 | - Some various and sundry improvements and new entries in the Tools |
| 774 | directory. |
| 775 | |
| 776 | |
| 777 | ===================================== |
Guido van Rossum | c30e95f | 1996-07-30 18:53:51 +0000 | [diff] [blame] | 778 | ==> Release 1.3 (13 October 1995) <== |
| 779 | ===================================== |
| 780 | |
| 781 | Major change |
| 782 | ============ |
| 783 | |
| 784 | Two words: Keyword Arguments. See the first section of Chapter 12 of |
| 785 | the Tutorial. |
| 786 | |
| 787 | (The rest of this file is textually the same as the remaining sections |
| 788 | of that chapter.) |
| 789 | |
| 790 | |
| 791 | Changes to the WWW and Internet tools |
| 792 | ===================================== |
| 793 | |
| 794 | The "htmllib" module has been rewritten in an incompatible fashion. |
| 795 | The new version is considerably more complete (HTML 2.0 except forms, |
| 796 | but including all ISO-8859-1 entity definitions), and easy to use. |
| 797 | Small changes to "sgmllib" have also been made, to better match the |
| 798 | tokenization of HTML as recognized by other web tools. |
| 799 | |
| 800 | A new module "formatter" has been added, for use with the new |
| 801 | "htmllib" module. |
| 802 | |
| 803 | The "urllib"and "httplib" modules have been changed somewhat to allow |
| 804 | overriding unknown URL types and to support authentication. They now |
| 805 | use "mimetools.Message" instead of "rfc822.Message" to parse headers. |
| 806 | The "endrequest()" method has been removed from the HTTP class since |
| 807 | it breaks the interaction with some servers. |
| 808 | |
| 809 | The "rfc822.Message" class has been changed to allow a flag to be |
| 810 | passed in that says that the file is unseekable. |
| 811 | |
| 812 | The "ftplib" module has been fixed to be (hopefully) more robust on |
| 813 | Linux. |
| 814 | |
| 815 | Several new operations that are optionally supported by servers have |
| 816 | been added to "nntplib": "xover", "xgtitle", "xpath" and "date". |
| 817 | |
| 818 | Other Language Changes |
| 819 | ====================== |
| 820 | |
| 821 | The "raise" statement now takes an optional argument which specifies |
| 822 | the traceback to be used when printing the exception's stack trace. |
| 823 | This must be a traceback object, such as found in "sys.exc_traceback". |
| 824 | When omitted or given as "None", the old behavior (to generate a stack |
| 825 | trace entry for the current stack frame) is used. |
| 826 | |
| 827 | The tokenizer is now more tolerant of alien whitespace. Control-L in |
| 828 | the leading whitespace of a line resets the column number to zero, |
| 829 | while Control-R just before the end of the line is ignored. |
| 830 | |
| 831 | Changes to Built-in Operations |
| 832 | ============================== |
| 833 | |
| 834 | For file objects, "f.read(0)" and "f.readline(0)" now return an empty |
| 835 | string rather than reading an unlimited number of bytes. For the |
| 836 | latter, omit the argument altogether or pass a negative value. |
| 837 | |
| 838 | A new system variable, "sys.platform", has been added. It specifies |
| 839 | the current platform, e.g. "sunos5" or "linux1". |
| 840 | |
| 841 | The built-in functions "input()" and "raw_input()" now use the GNU |
| 842 | readline library when it has been configured (formerly, only |
| 843 | interactive input to the interpreter itself was read using GNU |
| 844 | readline). The GNU readline library provides elaborate line editing |
| 845 | and history. The Python debugger ("pdb") is the first beneficiary of |
| 846 | this change. |
| 847 | |
| 848 | Two new built-in functions, "globals()" and "locals()", provide access |
| 849 | to dictionaries containming current global and local variables, |
| 850 | respectively. (These augment rather than replace "vars()", which |
| 851 | returns the current local variables when called without an argument, |
| 852 | and a module's global variables when called with an argument of type |
| 853 | module.) |
| 854 | |
| 855 | The built-in function "compile()" now takes a third possible value for |
| 856 | the kind of code to be compiled: specifying "'single'" generates code |
| 857 | for a single interactive statement, which prints the output of |
| 858 | expression statements that evaluate to something else than "None". |
| 859 | |
| 860 | Library Changes |
| 861 | =============== |
| 862 | |
| 863 | There are new module "ni" and "ihooks" that support importing modules |
| 864 | with hierarchical names such as "A.B.C". This is enabled by writing |
| 865 | "import ni; ni.ni()" at the very top of the main program. These |
| 866 | modules are amply documented in the Python source. |
| 867 | |
| 868 | The module "rexec" has been rewritten (incompatibly) to define a class |
| 869 | and to use "ihooks". |
| 870 | |
| 871 | The "string.split()" and "string.splitfields()" functions are now the |
| 872 | same function (the presence or absence of the second argument |
| 873 | determines which operation is invoked); similar for "string.join()" |
| 874 | and "string.joinfields()". |
| 875 | |
| 876 | The "Tkinter" module and its helper "Dialog" have been revamped to use |
| 877 | keyword arguments. Tk 4.0 is now the standard. A new module |
| 878 | "FileDialog" has been added which implements standard file selection |
| 879 | dialogs. |
| 880 | |
| 881 | The optional built-in modules "dbm" and "gdbm" are more coordinated |
| 882 | --- their "open()" functions now take the same values for their "flag" |
| 883 | argument, and the "flag" and "mode" argument have default values (to |
| 884 | open the database for reading only, and to create the database with |
| 885 | mode "0666" minuse the umask, respectively). The memory leaks have |
| 886 | finally been fixed. |
| 887 | |
| 888 | A new dbm-like module, "bsddb", has been added, which uses the BSD DB |
| 889 | package's hash method. |
| 890 | |
| 891 | A portable (though slow) dbm-clone, implemented in Python, has been |
| 892 | added for systems where none of the above is provided. It is aptly |
| 893 | dubbed "dumbdbm". |
| 894 | |
| 895 | The module "anydbm" provides a unified interface to "bsddb", "gdbm", |
| 896 | "dbm", and "dumbdbm", choosing the first one available. |
| 897 | |
| 898 | A new extension module, "binascii", provides a variety of operations |
| 899 | for conversion of text-encoded binary data. |
| 900 | |
| 901 | There are three new or rewritten companion modules implemented in |
| 902 | Python that can encode and decode the most common such formats: "uu" |
| 903 | (uuencode), "base64" and "binhex". |
| 904 | |
| 905 | A module to handle the MIME encoding quoted-printable has also been |
| 906 | added: "quopri". |
| 907 | |
| 908 | The parser module (which provides an interface to the Python parser's |
| 909 | abstract syntax trees) has been rewritten (incompatibly) by Fred |
| 910 | Drake. It now lets you change the parse tree and compile the result! |
| 911 | |
| 912 | The \code{syslog} module has been upgraded and documented. |
| 913 | |
| 914 | Other Changes |
| 915 | ============= |
| 916 | |
| 917 | The dynamic module loader recognizes the fact that different filenames |
| 918 | point to the same shared library and loads the library only once, so |
| 919 | you can have a single shared library that defines multiple modules. |
| 920 | (SunOS / SVR4 style shared libraries only.) |
| 921 | |
| 922 | Jim Fulton's ``abstract object interface'' has been incorporated into |
| 923 | the run-time API. For more detailes, read the files |
| 924 | "Include/abstract.h" and "Objects/abstract.c". |
| 925 | |
| 926 | The Macintosh version is much more robust now. |
| 927 | |
| 928 | Numerous things I have forgotten or that are so obscure no-one will |
| 929 | notice them anyway :-) |
| 930 | |
| 931 | |
Guido van Rossum | f456b6d | 1995-01-04 19:20:37 +0000 | [diff] [blame] | 932 | =================================== |
Guido van Rossum | d462f3d | 1995-10-09 21:30:37 +0000 | [diff] [blame] | 933 | ==> Release 1.2 (13 April 1995) <== |
| 934 | =================================== |
| 935 | |
| 936 | - Changes to Misc/python-mode.el: |
| 937 | - Wrapping and indentation within triple quote strings should work |
| 938 | properly now. |
| 939 | - `Standard' bug reporting mechanism (use C-c C-b) |
| 940 | - py-mark-block was moved to C-c C-m |
| 941 | - C-c C-v shows you the python-mode version |
| 942 | - a basic python-font-lock-keywords has been added for Emacs 19 |
| 943 | font-lock colorizations. |
| 944 | - proper interaction with pending-del and del-sel modes. |
| 945 | - New py-electric-colon (:) command for improved outdenting. Also |
| 946 | py-indent-line (TAB) should handle outdented lines better. |
| 947 | - New commands py-outdent-left (C-c C-l) and py-indent-right (C-c C-r) |
| 948 | |
| 949 | - The Library Reference has been restructured, and many new and |
| 950 | existing modules are now documented, in particular the debugger and |
| 951 | the profiler, as well as the persistency and the WWW/Internet support |
| 952 | modules. |
| 953 | |
| 954 | - All known bugs have been fixed. For example the pow(2,2,3L) bug on |
| 955 | Linux has been fixed. Also the re-entrancy problems with __del__ have |
| 956 | been fixed. |
| 957 | |
| 958 | - All known memory leaks have been fixed. |
| 959 | |
| 960 | - Phase 2 of the Great Renaming has been executed. The header files |
| 961 | now use the new names (PyObject instead of object, etc.). The linker |
| 962 | also sees the new names. Most source files still use the old names, |
| 963 | by virtue of the rename2.h header file. If you include Python.h, you |
| 964 | only see the new names. Dynamically linked modules have to be |
| 965 | recompiled. (Phase 3, fixing the rest of the sources, will be |
| 966 | executed gradually with the release later versions.) |
| 967 | |
| 968 | - The hooks for implementing "safe-python" (better called "restricted |
| 969 | execution") are in place. Specifically, the import statement is |
| 970 | implemented by calling the built-in function __import__, and the |
| 971 | built-in names used in a particular scope are taken from the |
| 972 | dictionary __builtins__ in that scope's global dictionary. See also |
| 973 | the new (unsupported, undocumented) module rexec.py. |
| 974 | |
| 975 | - The import statement now supports the syntax "import a.b.c" and |
| 976 | "from a.b.c import name". No officially supported implementation |
| 977 | exists, but one can be prototyped by replacing the built-in __import__ |
| 978 | function. A proposal by Ken Manheimer is provided as newimp.py. |
| 979 | |
| 980 | - All machinery used by the import statement (or the built-in |
| 981 | __import__ function) is now exposed through the new built-in module |
| 982 | "imp" (see the library reference manual). All dynamic loading |
| 983 | machinery is moved to the new file importdl.c. |
| 984 | |
| 985 | - Persistent storage is supported through the use of the modules |
| 986 | "pickle" and "shelve" (implemented in Python). There's also a "copy" |
| 987 | module implementing deepcopy and normal (shallow) copy operations. |
| 988 | See the library reference manual. |
| 989 | |
| 990 | - Documentation strings for many objects types are accessible through |
| 991 | the __doc__ attribute. Modules, classes and functions support special |
| 992 | syntax to initialize the __doc__ attribute: if the first statement |
| 993 | consists of just a string literal, that string literal becomes the |
| 994 | value of the __doc__ attribute. The default __doc__ attribute is |
| 995 | None. Documentation strings are also supported for built-in |
| 996 | functions, types and modules; however this feature hasn't been widely |
| 997 | used yet. See the 'new' module for an example. (Basically, the type |
| 998 | object's tp_doc field contains the doc string for the type, and the |
| 999 | 4th member of the methodlist structure contains the doc string for the |
| 1000 | method.) |
| 1001 | |
| 1002 | - The __coerce__ and __cmp__ methods for user-defined classes once |
| 1003 | again work as expected. As an example, there's a new standard class |
| 1004 | Complex in the library. |
| 1005 | |
| 1006 | - The functions posix.popen() and posix.fdopen() now have an optional |
| 1007 | third argument to specify the buffer size, and default their second |
| 1008 | (mode) argument to 'r' -- in analogy to the builtin open() function. |
| 1009 | The same applies to posixfile.open() and the socket method makefile(). |
| 1010 | |
| 1011 | - The thread.exit_thread() function now raises SystemExit so that |
| 1012 | 'finally' clauses are honored and a memory leak is plugged. |
| 1013 | |
| 1014 | - Improved X11 and Motif support, by Sjoerd Mullender. This extension |
| 1015 | is being maintained and distributed separately. |
| 1016 | |
| 1017 | - Improved support for the Apple Macintosh, in part by Jack Jansen, |
| 1018 | e.g. interfaces to (a few) resource mananger functions, get/set file |
| 1019 | type and creator, gestalt, sound manager, speech manager, MacTCP, comm |
| 1020 | toolbox, and the think C console library. This is being maintained |
| 1021 | and distributed separately. |
| 1022 | |
| 1023 | - Improved version for Windows NT, by Mark Hammond. This is being |
| 1024 | maintained and distributed separately. |
| 1025 | |
| 1026 | - Used autoconf 2.0 to generate the configure script. Adapted |
| 1027 | configure.in to use the new features in autoconf 2.0. |
| 1028 | |
| 1029 | - It now builds on the NeXT without intervention, even on the 3.3 |
| 1030 | Sparc pre-release. |
| 1031 | |
| 1032 | - Characters passed to isspace() and friends are masked to nonnegative |
| 1033 | values. |
| 1034 | |
| 1035 | - Correctly compute pow(-3.0, 3). |
| 1036 | |
| 1037 | - Fix portability problems with getopt (configure now checks for a |
| 1038 | non-GNU getopt). |
| 1039 | |
| 1040 | - Don't add frozenmain.o to libPython.a. |
| 1041 | |
| 1042 | - Exceptions can now be classes. ALl built-in exceptions are still |
| 1043 | string objects, but this will change in the future. |
| 1044 | |
| 1045 | - The socket module exports a long list of socket related symbols. |
| 1046 | (More built-in modules will export their symbolic constants instead of |
| 1047 | relying on a separately generated Python module.) |
| 1048 | |
| 1049 | - When a module object is deleted, it clears out its own dictionary. |
| 1050 | This fixes a circularity in the references between functions and |
| 1051 | their global dictionary. |
| 1052 | |
| 1053 | - Changed the error handling by [new]getargs() e.g. for "O&". |
| 1054 | |
| 1055 | - Dynamic loading of modules using shared libraries is supported for |
| 1056 | several new platforms. |
| 1057 | |
| 1058 | - Support "O&", "[...]" and "{...}" in mkvalue(). |
| 1059 | |
| 1060 | - Extension to findmethod(): findmethodinchain() (where a chain is a |
| 1061 | linked list of methodlist arrays). The calling interface for |
| 1062 | findmethod() has changed: it now gets a pointer to the (static!) |
| 1063 | methodlist structure rather than just to the function name -- this |
| 1064 | saves copying flags etc. into the (short-lived) method object. |
| 1065 | |
| 1066 | - The callable() function is now public. |
| 1067 | |
| 1068 | - Object types can define a few new operations by setting function |
| 1069 | pointers in the type object structure: tp_call defines how an object |
| 1070 | is called, and tp_str defines how an object's str() is computed. |
| 1071 | |
| 1072 | |
| 1073 | =================================== |
Guido van Rossum | f456b6d | 1995-01-04 19:20:37 +0000 | [diff] [blame] | 1074 | ==> Release 1.1.1 (10 Nov 1994) <== |
| 1075 | =================================== |
| 1076 | |
| 1077 | This is a pure bugfix release again. See the ChangeLog file for details. |
| 1078 | |
| 1079 | One exception: a few new features were added to tkinter. |
| 1080 | |
| 1081 | |
| 1082 | ================================= |
| 1083 | ==> Release 1.1 (11 Oct 1994) <== |
| 1084 | ================================= |
| 1085 | |
| 1086 | This release adds several new features, improved configuration and |
| 1087 | portability, and fixes more bugs than I can list here (including some |
| 1088 | memory leaks). |
| 1089 | |
| 1090 | The source compiles and runs out of the box on more platforms than |
| 1091 | ever -- including Windows NT. Makefiles or projects for a variety of |
| 1092 | non-UNIX platforms are provided. |
| 1093 | |
| 1094 | APOLOGY: some new features are badly documented or not at all. I had |
| 1095 | the choice -- postpone the new release indefinitely, or release it |
| 1096 | now, with working code but some undocumented areas. The problem with |
| 1097 | postponing the release is that people continue to suffer from existing |
| 1098 | bugs, and send me patches based on the previous release -- which I |
| 1099 | can't apply directly because my own source has changed. Also, some |
| 1100 | new modules (like signal) have been ready for release for quite some |
| 1101 | time, and people are anxiously waiting for them. In the case of |
| 1102 | signal, the interface is simple enough to figure out without |
| 1103 | documentation (if you're anxious enough :-). In this case it was not |
| 1104 | simple to release the module on its own, since it relies on many small |
| 1105 | patches elsewhere in the source. |
| 1106 | |
| 1107 | For most new Python modules, the source code contains comments that |
| 1108 | explain how to use them. Documentation for the Tk interface, written |
| 1109 | by Matt Conway, is available as tkinter-doc.tar.gz from the Python |
| 1110 | home and mirror ftp sites (see Misc/FAQ for ftp addresses). For the |
| 1111 | new operator overloading facilities, have a look at Demo/classes: |
| 1112 | Complex.py and Rat.py show how to implement a numeric type without and |
| 1113 | with __coerce__ method. Also have a look at the end of the Tutorial |
| 1114 | document (Doc/tut.tex). If you're still confused: use the newsgroup |
| 1115 | or mailing list. |
| 1116 | |
| 1117 | |
| 1118 | New language features: |
| 1119 | |
| 1120 | - More flexible operator overloading for user-defined classes |
| 1121 | (INCOMPATIBLE WITH PREVIOUS VERSIONS!) See end of tutorial. |
| 1122 | |
| 1123 | - Classes can define methods named __getattr__, __setattr__ and |
| 1124 | __delattr__ to trap attribute accesses. See end of tutorial. |
| 1125 | |
| 1126 | - Classes can define method __call__ so instances can be called |
| 1127 | directly. See end of tutorial. |
| 1128 | |
| 1129 | |
| 1130 | New support facilities: |
| 1131 | |
| 1132 | - The Makefiles (for the base interpreter as well as for extensions) |
| 1133 | now support creating dynamically loadable modules if the platform |
| 1134 | supports shared libraries. |
| 1135 | |
| 1136 | - Passing the interpreter a .pyc file as script argument will execute |
| 1137 | the code in that file. (On the Mac such files can be double-clicked!) |
| 1138 | |
| 1139 | - New Freeze script, to create independently distributable "binaries" |
| 1140 | of Python programs -- look in Demo/freeze |
| 1141 | |
| 1142 | - Improved h2py script (in Demo/scripts) follows #includes and |
| 1143 | supports macros with one argument |
| 1144 | |
| 1145 | - New module compileall generates .pyc files for all modules in a |
| 1146 | directory (tree) without also executing them |
| 1147 | |
| 1148 | - Threads should work on more platforms |
| 1149 | |
| 1150 | |
| 1151 | New built-in modules: |
| 1152 | |
| 1153 | - tkinter (support for Tcl's Tk widget set) is now part of the base |
| 1154 | distribution |
| 1155 | |
| 1156 | - signal allows catching or ignoring UNIX signals (unfortunately still |
| 1157 | undocumented -- any taker?) |
| 1158 | |
| 1159 | - termios provides portable access to POSIX tty settings |
| 1160 | |
| 1161 | - curses provides an interface to the System V curses library |
| 1162 | |
| 1163 | - syslog provides an interface to the (BSD?) syslog daemon |
| 1164 | |
| 1165 | - 'new' provides interfaces to create new built-in object types |
| 1166 | (e.g. modules and functions) |
| 1167 | |
| 1168 | - sybase provides an interface to SYBASE database |
| 1169 | |
| 1170 | |
| 1171 | New/obsolete built-in methods: |
| 1172 | |
| 1173 | - callable(x) tests whether x can be called |
| 1174 | |
| 1175 | - sockets now have a setblocking() method |
| 1176 | |
| 1177 | - sockets no longer have an allowbroadcast() method |
| 1178 | |
| 1179 | - socket methods send() and sendto() return byte count |
| 1180 | |
| 1181 | |
| 1182 | New standard library modules: |
| 1183 | |
| 1184 | - types.py defines standard names for built-in types, e.g. StringType |
| 1185 | |
| 1186 | - urlparse.py parses URLs according to the latest Internet draft |
| 1187 | |
| 1188 | - uu.py does uuencode/uudecode (not the fastest in the world, but |
| 1189 | quicker than installing uuencode on a non-UNIX machine :-) |
| 1190 | |
| 1191 | - New, faster and more powerful profile module.py |
| 1192 | |
| 1193 | - mhlib.py provides interface to MH folders and messages |
| 1194 | |
| 1195 | |
| 1196 | New facilities for extension writers (unfortunately still |
| 1197 | undocumented): |
| 1198 | |
| 1199 | - newgetargs() supports optional arguments and improved error messages |
| 1200 | |
| 1201 | - O!, O& O? formats for getargs allow more versatile type checking of |
| 1202 | non-standard types |
| 1203 | |
| 1204 | - can register pending asynchronous callback, to be called the next |
| 1205 | time the Python VM begins a new instruction (Py_AddPendingCall) |
| 1206 | |
| 1207 | - can register cleanup routines to be called when Python exits |
| 1208 | (Py_AtExit) |
| 1209 | |
| 1210 | - makesetup script understands C++ files in Setup file (use file.C |
| 1211 | or file.cc) |
| 1212 | |
| 1213 | - Make variable OPT is passed on to sub-Makefiles |
| 1214 | |
| 1215 | - An init<module>() routine may signal an error by not entering |
| 1216 | the module in the module table and raising an exception instead |
| 1217 | |
| 1218 | - For long module names, instead of foobarbletchmodule.c you can |
| 1219 | use foobarbletch.c |
| 1220 | |
| 1221 | - getintvalue() and getfloatvalue() try to convert any object |
| 1222 | instead of requiring an "intobject" or "floatobject" |
| 1223 | |
| 1224 | - All the [new]getargs() formats that retrieve an integer value |
| 1225 | will now also work if a float is passed |
| 1226 | |
| 1227 | - C function listtuple() converts list to tuple, fast |
| 1228 | |
| 1229 | - You should now call sigcheck() instead of intrcheck(); |
| 1230 | sigcheck() also sets an exception when it returns nonzero |
| 1231 | |
| 1232 | |
Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 1233 | ==================================== |
| 1234 | ==> Release 1.0.3 (14 July 1994) <== |
| 1235 | ==================================== |
| 1236 | |
| 1237 | This release consists entirely of bug fixes to the C sources; see the |
| 1238 | head of ../ChangeLog for a complete list. Most important bugs fixed: |
| 1239 | |
| 1240 | - Sometimes the format operator (string%expr) would drop the last |
| 1241 | character of the format string |
| 1242 | |
| 1243 | - Tokenizer looped when last line did not end in \n |
| 1244 | |
| 1245 | - Bug when triple-quoted string ended in quote plus newline |
| 1246 | |
| 1247 | - Typo in socketmodule (listen) (== instead of =) |
| 1248 | |
| 1249 | - typing vars() at the >>> prompt would cause recursive output |
| 1250 | |
| 1251 | |
| 1252 | ================================== |
| 1253 | ==> Release 1.0.2 (4 May 1994) <== |
| 1254 | ================================== |
| 1255 | |
| 1256 | Overview of the most visible changes. Bug fixes are not listed. See |
| 1257 | also ChangeLog. |
| 1258 | |
| 1259 | Tokens |
| 1260 | ------ |
| 1261 | |
| 1262 | * String literals follow Standard C rules: they may be continued on |
| 1263 | the next line using a backslash; adjacent literals are concatenated |
| 1264 | at compile time. |
| 1265 | |
| 1266 | * A new kind of string literals, surrounded by triple quotes (""" or |
| 1267 | '''), can be continued on the next line without a backslash. |
| 1268 | |
| 1269 | Syntax |
| 1270 | ------ |
| 1271 | |
| 1272 | * Function arguments may have a default value, e.g. def f(a, b=1); |
| 1273 | defaults are evaluated at function definition time. This also applies |
| 1274 | to lambda. |
| 1275 | |
| 1276 | * The try-except statement has an optional else clause, which is |
| 1277 | executed when no exception occurs in the try clause. |
| 1278 | |
| 1279 | Interpreter |
| 1280 | ----------- |
| 1281 | |
| 1282 | * The result of a statement-level expression is no longer printed, |
| 1283 | except_ for expressions entered interactively. Consequently, the -k |
| 1284 | command line option is gone. |
| 1285 | |
| 1286 | * The result of the last printed interactive expression is assigned to |
| 1287 | the variable '_'. |
| 1288 | |
| 1289 | * Access to implicit global variables has been speeded up by removing |
| 1290 | an always-failing dictionary lookup in the dictionary of local |
| 1291 | variables (mod suggested by Steve Makewski and Tim Peters). |
| 1292 | |
| 1293 | * There is a new command line option, -u, to force stdout and stderr |
| 1294 | to be unbuffered. |
| 1295 | |
| 1296 | * Incorporated Steve Majewski's mods to import.c for dynamic loading |
| 1297 | under AIX. |
| 1298 | |
| 1299 | * Fewer chances of dumping core when trying to reload or re-import |
| 1300 | static built-in, dynamically loaded built-in, or frozen modules. |
| 1301 | |
| 1302 | * Loops over sequences now don't ask for the sequence's length when |
| 1303 | they start, but try to access items 0, 1, 2, and so on until they hit |
| 1304 | an IndexError. This makes it possible to create classes that generate |
| 1305 | infinite or indefinite sequences a la Steve Majewski. This affects |
| 1306 | for loops, the (not) in operator, and the built-in functions filter(), |
| 1307 | map(), max(), min(), reduce(). |
| 1308 | |
| 1309 | Changed Built-in operations |
| 1310 | --------------------------- |
| 1311 | |
| 1312 | * The '%' operator on strings (printf-style formatting) supports a new |
| 1313 | feature (adapted from a patch by Donald Beaudry) to allow |
| 1314 | '%(<key>)<format>' % {...} to take values from a dictionary by name |
| 1315 | instead of from a tuple by position (see also the new function |
| 1316 | vars()). |
| 1317 | |
| 1318 | * The '%s' formatting operator is changed to accept any type and |
| 1319 | convert it to a string using str(). |
| 1320 | |
| 1321 | * Dictionaries with more than 20,000 entries can now be created |
| 1322 | (thanks to Steve Kirsch). |
| 1323 | |
| 1324 | New Built-in Functions |
| 1325 | ---------------------- |
| 1326 | |
| 1327 | * vars() returns a dictionary containing the local variables; vars(m) |
| 1328 | returns a dictionary containing the variables of module m. Note: |
| 1329 | dir(x) is now equivalent to vars(x).keys(). |
| 1330 | |
| 1331 | Changed Built-in Functions |
| 1332 | -------------------------- |
| 1333 | |
| 1334 | * open() has an optional third argument to specify the buffer size: 0 |
| 1335 | for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0 |
| 1336 | for default. |
| 1337 | |
| 1338 | * open()'s second argument is now optional; it defaults to "r". |
| 1339 | |
| 1340 | * apply() now checks that its second argument is indeed a tuple. |
| 1341 | |
| 1342 | New Built-in Modules |
| 1343 | -------------------- |
| 1344 | |
| 1345 | Changed Built-in Modules |
| 1346 | ------------------------ |
| 1347 | |
| 1348 | The thread module no longer supports exit_prog(). |
| 1349 | |
| 1350 | New Python Modules |
| 1351 | ------------------ |
| 1352 | |
| 1353 | * Module addpack contains a standard interface to modify sys.path to |
| 1354 | find optional packages (groups of related modules). |
| 1355 | |
| 1356 | * Module urllib contains a number of functions to access |
| 1357 | World-Wide-Web files specified by their URL. |
| 1358 | |
| 1359 | * Module httplib implements the client side of the HTTP protocol used |
| 1360 | by World-Wide-Web servers. |
| 1361 | |
| 1362 | * Module gopherlib implements the client side of the Gopher protocol. |
| 1363 | |
| 1364 | * Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF |
| 1365 | style mailbox files. |
| 1366 | |
| 1367 | * Module random contains various random distributions, e.g. gauss(). |
| 1368 | |
| 1369 | * Module lockfile locks and unlocks open files using fcntl (inspired |
| 1370 | by a similar module by Andy Bensky). |
| 1371 | |
| 1372 | * Module ntpath (by Jaap Vermeulen) implements path operations for |
| 1373 | Windows/NT. |
| 1374 | |
| 1375 | * Module test_thread (in Lib/test) contains a small test set for the |
| 1376 | thread module. |
| 1377 | |
| 1378 | Changed Python Modules |
| 1379 | ---------------------- |
| 1380 | |
| 1381 | * The string module's expandvars() function is now documented and is |
| 1382 | implemented in Python (using regular expressions) instead of forking |
| 1383 | off a shell process. |
| 1384 | |
| 1385 | * Module rfc822 now supports accessing the header fields using the |
| 1386 | mapping/dictionary interface, e.g. h['subject']. |
| 1387 | |
| 1388 | * Module pdb now makes it possible to set a break on a function |
| 1389 | (syntax: break <expression>, where <expression> yields a function |
| 1390 | object). |
| 1391 | |
| 1392 | Changed Demos |
| 1393 | ------------- |
| 1394 | |
| 1395 | * The Demo/scripts/freeze.py script is working again (thanks to Jaap |
| 1396 | Vermeulen). |
| 1397 | |
| 1398 | New Demos |
| 1399 | --------- |
| 1400 | |
| 1401 | * Demo/threads/Generator.py is a proposed interface for restartable |
| 1402 | functions a la Tim Peters. |
| 1403 | |
| 1404 | * Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a |
| 1405 | directory full of HTML pages which between them contain links to all |
| 1406 | the newsgroups available on your server. |
| 1407 | |
| 1408 | * Demo/dns contains a DNS (Domain Name Server) client. |
| 1409 | |
| 1410 | * Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a |
| 1411 | nice enhanced Python shell!!!). |
| 1412 | |
| 1413 | * Demo/turing contains a Turing machine by Amrit Prem. |
| 1414 | |
| 1415 | Documentation |
| 1416 | ------------- |
| 1417 | |
| 1418 | * Documented new language features mentioned above (but not all new |
| 1419 | modules). |
| 1420 | |
| 1421 | * Added a chapter to the Tutorial describing recent additions to |
| 1422 | Python. |
| 1423 | |
| 1424 | * Clarified some sentences in the reference manual, |
| 1425 | e.g. break/continue, local/global scope, slice assignment. |
| 1426 | |
| 1427 | Source Structure |
| 1428 | ---------------- |
| 1429 | |
| 1430 | * Moved Include/tokenizer.h to Parser/tokenizer.h. |
| 1431 | |
| 1432 | * Added Python/getopt.c for systems that don't have it. |
| 1433 | |
| 1434 | Emacs mode |
| 1435 | ---------- |
| 1436 | |
| 1437 | * Indentation of continuated lines is done more intelligently; |
| 1438 | consequently the variable py-continuation-offset is gone. |
| 1439 | |
| 1440 | ======================================== |
| 1441 | ==> Release 1.0.1 (15 February 1994) <== |
| 1442 | ======================================== |
| 1443 | |
| 1444 | * Many portability fixes should make it painless to build Python on |
| 1445 | several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows. |
| 1446 | |
| 1447 | * Fixed test for <stdarg.h> -- this broke on some platforms. |
| 1448 | |
| 1449 | * Fixed test for shared library dynalic loading -- this broke on SunOS |
| 1450 | 4.x using the GNU loader. |
| 1451 | |
| 1452 | * Changed order and number of SVR4 networking libraries (it is now |
| 1453 | -lsocket -linet -lnsl, if these libraries exist). |
| 1454 | |
| 1455 | * Installing the build intermediate stages with "make libainstall" now |
| 1456 | also installs config.c.in, Setup and makesetup, which are used by the |
| 1457 | new Extensions mechanism. |
| 1458 | |
| 1459 | * Improved README file contains more hints and new troubleshooting |
| 1460 | section. |
| 1461 | |
| 1462 | * The built-in module strop now defines fast versions of three more |
| 1463 | functions of the standard string module: atoi(), atol() and atof(). |
| 1464 | The strop versions of atoi() and atol() support an optional second |
| 1465 | argument to specify the base (default 10). NOTE: you don't have to |
| 1466 | explicitly import strop to use the faster versions -- the string |
| 1467 | module contains code to let versions from stop override the default |
| 1468 | versions. |
| 1469 | |
| 1470 | * There is now a working Lib/dospath.py for those who use Python under |
| 1471 | DOS (or Windows). Thanks, Jaap! |
| 1472 | |
| 1473 | * There is now a working Modules/dosmodule.c for DOS (or Windows) |
| 1474 | system calls. |
| 1475 | |
| 1476 | * Lib.os.py has been reorganized (making it ready for more operating |
| 1477 | systems). |
| 1478 | |
| 1479 | * Lib/ospath.py is now obsolete (use os.path instead). |
| 1480 | |
| 1481 | * Many fixes to the tutorial to make it match Python 1.0. Thanks, |
| 1482 | Tim! |
| 1483 | |
| 1484 | * Fixed Doc/Makefile, Doc/README and various scripts there. |
| 1485 | |
| 1486 | * Added missing description of fdopen to Doc/libposix.tex. |
| 1487 | |
| 1488 | * Made cleanup() global, for the benefit of embedded applications. |
| 1489 | |
| 1490 | * Added parsing of addresses and dates to Lib/rfc822.py. |
| 1491 | |
| 1492 | * Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make |
| 1493 | them usable at all. |
| 1494 | |
| 1495 | * New module Lib/wave.py reads RIFF (*.wav) audio files. |
| 1496 | |
| 1497 | * Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it |
| 1498 | belongs. |
| 1499 | |
| 1500 | * New options and comments for Modules/makesetup (used by new |
| 1501 | Extension mechanism). |
| 1502 | |
| 1503 | * Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc |
| 1504 | and elsewhere. |
| 1505 | |
| 1506 | * Fixed coredump in filter(None, 'abcdefg'). |
| 1507 | |
| 1508 | |
| 1509 | ======================================= |
| 1510 | ==> Release 1.0.0 (26 January 1994) <== |
| 1511 | ======================================= |
| 1512 | |
| 1513 | As is traditional, so many things have changed that I can't pretend to |
| 1514 | be complete in these release notes, but I'll try anyway :-) |
| 1515 | |
| 1516 | Note that the very last section is labeled "remaining bugs". |
| 1517 | |
| 1518 | |
| 1519 | Source organization and build process |
| 1520 | ------------------------------------- |
| 1521 | |
| 1522 | * The sources have finally been split: instead of a single src |
| 1523 | subdirectory there are now separate directories Include, Parser, |
| 1524 | Grammar, Objects, Python and Modules. Other directories also start |
| 1525 | with a capital letter: Misc, Doc, Lib, Demo. |
| 1526 | |
| 1527 | * A few extensions (notably Amoeba and X support) have been moved to a |
| 1528 | separate subtree Extensions, which is no longer in the core |
| 1529 | distribution, but separately ftp'able as extensions.tar.Z. (The |
| 1530 | distribution contains a placeholder Ext-dummy with a description of |
| 1531 | the Extensions subtree as well as the most recent versions of the |
| 1532 | scripts used there.) |
| 1533 | |
| 1534 | * A few large specialized demos (SGI video and www) have been |
| 1535 | moved to a separate subdirectory Demo2, which is no longer in the core |
| 1536 | distribution, but separately ftp'able as demo2.tar.Z. |
| 1537 | |
| 1538 | * Parts of the standard library have been moved to subdirectories: |
| 1539 | there are now standard subdirectories stdwin, test, sgi and sun4. |
| 1540 | |
| 1541 | * The configuration process has radically changed: I now use GNU |
| 1542 | autoconf. This makes it much easier to build on new Unix flavors, as |
| 1543 | well as fully supporting VPATH (if your Make has it). The scripts |
| 1544 | Configure.py and Addmodule.sh are no longer needed. Many source files |
| 1545 | have been adapted in order to work with the symbols that the configure |
| 1546 | script generated by autoconf defines (or not); the resulting source is |
| 1547 | much more portable to different C compilers and operating systems, |
| 1548 | even non Unix systems (a Mac port was done in an afternoon). See the |
| 1549 | toplevel README file for a description of the new build process. |
| 1550 | |
| 1551 | * GNU readline (a slightly newer version) is now a subdirectory of the |
| 1552 | Python toplevel. It is still not automatically configured (being |
| 1553 | totally autoconf-unaware :-). One problem has been solved: typing |
| 1554 | Control-C to a readline prompt will now work. The distribution no |
| 1555 | longer contains a "super-level" directory (above the python toplevel |
| 1556 | directory), and dl, dl-dld and GNU dld are no longer part of the |
| 1557 | Python distribution (you can still ftp them from |
| 1558 | ftp.cwi.nl:/pub/dynload). |
| 1559 | |
| 1560 | * The DOS functions have been taken out of posixmodule.c and moved |
| 1561 | into a separate file dosmodule.c. |
| 1562 | |
| 1563 | * There's now a separate file version.c which contains nothing but |
| 1564 | the version number. |
| 1565 | |
| 1566 | * The actual main program is now contained in config.c (unless NO_MAIN |
| 1567 | is defined); pythonmain.c now contains a function realmain() which is |
| 1568 | called from config.c's main(). |
| 1569 | |
| 1570 | * All files needed to use the built-in module md5 are now contained in |
| 1571 | the distribution. The module has been cleaned up considerably. |
| 1572 | |
| 1573 | |
| 1574 | Documentation |
| 1575 | ------------- |
| 1576 | |
| 1577 | * The library manual has been split into many more small latex files, |
| 1578 | so it is easier to edit Doc/lib.tex file to create a custom library |
| 1579 | manual, describing only those modules supported on your system. (This |
| 1580 | is not automated though.) |
| 1581 | |
| 1582 | * A fourth manual has been added, titled "Extending and Embedding the |
| 1583 | Python Interpreter" (Doc/ext.tex), which collects information about |
| 1584 | the interpreter which was previously spread over several files in the |
| 1585 | misc subdirectory. |
| 1586 | |
| 1587 | * The entire documentation is now also available on-line for those who |
| 1588 | have a WWW browser (e.g. NCSA Mosaic). Point your browser to the URL |
| 1589 | "http://www.cwi.nl/~guido/Python.html". |
| 1590 | |
| 1591 | |
| 1592 | Syntax |
| 1593 | ------ |
| 1594 | |
| 1595 | * Strings may now be enclosed in double quotes as well as in single |
| 1596 | quotes. There is no difference in interpretation. The repr() of |
| 1597 | string objects will use double quotes if the string contains a single |
| 1598 | quote and no double quotes. Thanks to Amrit Prem for these changes! |
| 1599 | |
| 1600 | * There is a new keyword 'exec'. This replaces the exec() built-in |
| 1601 | function. If a function contains an exec statement, local variable |
| 1602 | optimization is not performed for that particular function, thus |
| 1603 | making assignment to local variables in exec statements less |
| 1604 | confusing. (As a consequence, os.exec and python.exec have been |
| 1605 | renamed to execv.) |
| 1606 | |
| 1607 | * There is a new keyword 'lambda'. An expression of the form |
| 1608 | |
| 1609 | lambda <parameters> : <expression> |
| 1610 | |
| 1611 | yields an anonymous function. This is really only syntactic sugar; |
| 1612 | you can just as well define a local function using |
| 1613 | |
| 1614 | def some_temporary_name(<parameters>): return <expression> |
| 1615 | |
| 1616 | Lambda expressions are particularly useful in combination with map(), |
| 1617 | filter() and reduce(), described below. Thanks to Amrit Prem for |
| 1618 | submitting this code (as well as map(), filter(), reduce() and |
| 1619 | xrange())! |
| 1620 | |
| 1621 | |
| 1622 | Built-in functions |
| 1623 | ------------------ |
| 1624 | |
| 1625 | * The built-in module containing the built-in functions is called |
| 1626 | __builtin__ instead of builtin. |
| 1627 | |
| 1628 | * New built-in functions map(), filter() and reduce() perform standard |
| 1629 | functional programming operations (though not lazily): |
| 1630 | |
| 1631 | - map(f, seq) returns a new sequence whose items are the items from |
| 1632 | seq with f() applied to them. |
| 1633 | |
| 1634 | - filter(f, seq) returns a subsequence of seq consisting of those |
| 1635 | items for which f() is true. |
| 1636 | |
| 1637 | - reduce(f, seq, initial) returns a value computed as follows: |
| 1638 | acc = initial |
| 1639 | for item in seq: acc = f(acc, item) |
| 1640 | return acc |
| 1641 | |
| 1642 | * New function xrange() creates a "range object". Its arguments are |
| 1643 | the same as those of range(), and when used in a for loop a range |
| 1644 | objects also behaves identical. The advantage of xrange() over |
| 1645 | range() is that its representation (if the range contains many |
| 1646 | elements) is much more compact than that of range(). The disadvantage |
| 1647 | is that the result cannot be used to initialize a list object or for |
| 1648 | the "Python idiom" [RED, GREEN, BLUE] = range(3). On some modern |
| 1649 | architectures, benchmarks have shown that "for i in range(...): ..." |
| 1650 | actually executes *faster* than "for i in xrange(...): ...", but on |
| 1651 | memory starved machines like PCs running DOS range(100000) may be just |
| 1652 | too big to be represented at all... |
| 1653 | |
| 1654 | * Built-in function exec() has been replaced by the exec statement -- |
| 1655 | see above. |
| 1656 | |
| 1657 | |
| 1658 | The interpreter |
| 1659 | --------------- |
| 1660 | |
| 1661 | * Syntax errors are now not printed to stderr by the parser, but |
| 1662 | rather the offending line and other relevant information are packed up |
| 1663 | in the SyntaxError exception argument. When the main loop catches a |
| 1664 | SyntaxError exception it will print the error in the same format as |
| 1665 | previously, but at the proper position in the stack traceback. |
| 1666 | |
| 1667 | * You can now set a maximum to the number of traceback entries |
| 1668 | printed by assigning to sys.tracebacklimit. The default is 1000. |
| 1669 | |
| 1670 | * The version number in .pyc files has changed yet again. |
| 1671 | |
| 1672 | * It is now possible to have a .pyc file without a corresponding .py |
| 1673 | file. (Warning: this may break existing installations if you have an |
| 1674 | old .pyc file lingering around somewhere on your module search path |
| 1675 | without a corresponding .py file, when there is a .py file for a |
| 1676 | module of the same name further down the path -- the new interpreter |
| 1677 | will find the first .pyc file and complain about it, while the old |
| 1678 | interpreter would ignore it and use the .py file further down.) |
| 1679 | |
| 1680 | * The list sys.builtin_module_names is now sorted and also contains |
| 1681 | the names of a few hardwired built-in modules (sys, __main__ and |
| 1682 | __builtin__). |
| 1683 | |
| 1684 | * A module can now find its own name by accessing the global variable |
| 1685 | __name__. Assigning to this variable essentially renames the module |
| 1686 | (it should also be stored under a different key in sys.modules). |
| 1687 | A neat hack follows from this: a module that wants to execute a main |
| 1688 | program when called as a script no longer needs to compare |
| 1689 | sys.argv[0]; it can simply do "if __name__ == '__main__': main()". |
| 1690 | |
| 1691 | * When an object is printed by the print statement, its implementation |
| 1692 | of str() is used. This means that classes can define __str__(self) to |
| 1693 | direct how their instances are printed. This is different from |
| 1694 | __repr__(self), which should define an unambigous string |
| 1695 | representation of the instance. (If __str__() is not defined, it |
| 1696 | defaults to __repr__().) |
| 1697 | |
| 1698 | * Functions and code objects can now be compared meaningfully. |
| 1699 | |
| 1700 | * On systems supporting SunOS or SVR4 style shared libraries, dynamic |
| 1701 | loading of modules using shared libraries is automatically configured. |
| 1702 | Thanks to Bill Jansen and Denis Severson for contributing this change! |
| 1703 | |
| 1704 | |
| 1705 | Built-in objects |
| 1706 | ---------------- |
| 1707 | |
| 1708 | * File objects have acquired a new method writelines() which is the |
| 1709 | reverse of readlines(). (It does not actually write lines, just a |
| 1710 | list of strings, but the symmetry makes the choice of name OK.) |
| 1711 | |
| 1712 | |
| 1713 | Built-in modules |
| 1714 | ---------------- |
| 1715 | |
| 1716 | * Socket objects no longer support the avail() method. Use the select |
| 1717 | module instead, or use this function to replace it: |
| 1718 | |
| 1719 | def avail(f): |
| 1720 | import select |
| 1721 | return f in select.select([f], [], [], 0)[0] |
| 1722 | |
| 1723 | * Initialization of stdwin is done differently. It actually modifies |
| 1724 | sys.argv (taking out the options the X version of stdwin recognizes) |
| 1725 | the first time it is imported. |
| 1726 | |
| 1727 | * A new built-in module parser provides a rudimentary interface to the |
| 1728 | python parser. Corresponding standard library modules token and symbol |
| 1729 | defines the numeric values of tokens and non-terminal symbols. |
| 1730 | |
| 1731 | * The posix module has aquired new functions setuid(), setgid(), |
| 1732 | execve(), and exec() has been renamed to execv(). |
| 1733 | |
| 1734 | * The array module is extended with 8-byte object swaps, the 'i' |
| 1735 | format character, and a reverse() method. The read() and write() |
| 1736 | methods are renamed to fromfile() and tofile(). |
| 1737 | |
| 1738 | * The rotor module has freed of portability bugs. This introduces a |
| 1739 | backward compatibility problem: strings encoded with the old rotor |
| 1740 | module can't be decoded by the new version. |
| 1741 | |
| 1742 | * For select.select(), a timeout (4th) argument of None means the same |
| 1743 | as leaving the timeout argument out. |
| 1744 | |
| 1745 | * Module strop (and hence standard library module string) has aquired |
| 1746 | a new function: rindex(). Thanks to Amrit Prem! |
| 1747 | |
| 1748 | * Module regex defines a new function symcomp() which uses an extended |
| 1749 | regular expression syntax: parenthesized subexpressions may be labeled |
| 1750 | using the form "\(<labelname>...\)", and the group() method can return |
| 1751 | sub-expressions by name. Thanks to Tracy Tims for these changes! |
| 1752 | |
| 1753 | * Multiple threads are now supported on Solaris 2. Thanks to Sjoerd |
| 1754 | Mullender! |
| 1755 | |
| 1756 | |
| 1757 | Standard library modules |
| 1758 | ------------------------ |
| 1759 | |
| 1760 | * The library is now split in several subdirectories: all stuff using |
| 1761 | stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff |
| 1762 | is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all |
| 1763 | test modules are in Lib/test. The default module search path will |
| 1764 | include all relevant subdirectories by default. |
| 1765 | |
| 1766 | * Module os now knows about trying to import dos. It defines |
| 1767 | functions execl(), execle(), execlp() and execvp(). |
| 1768 | |
| 1769 | * New module dospath (should be attacked by a DOS hacker though). |
| 1770 | |
| 1771 | * All modules defining classes now define __init__() constructors |
| 1772 | instead of init() methods. THIS IS AN INCOMPATIBLE CHANGE! |
| 1773 | |
| 1774 | * Some minor changes and bugfixes module ftplib (mostly Steve |
| 1775 | Majewski's suggestions); the debug() method is renamed to |
| 1776 | set_debuglevel(). |
| 1777 | |
| 1778 | * Some new test modules (not run automatically by testall though): |
| 1779 | test_audioop, test_md5, test_rgbimg, test_select. |
| 1780 | |
| 1781 | * Module string now defines rindex() and rfind() in analogy of index() |
| 1782 | and find(). It also defines atof() and atol() (and corresponding |
| 1783 | exceptions) in analogy to atoi(). |
| 1784 | |
| 1785 | * Added help() functions to modules profile and pdb. |
| 1786 | |
| 1787 | * The wdb debugger (now in Lib/stdwin) now shows class or instance |
| 1788 | variables on a double click. Thanks to Sjoerd Mullender! |
| 1789 | |
| 1790 | * The (undocumented) module lambda has gone -- you couldn't import it |
| 1791 | any more, and it was basically more a demo than a library module... |
| 1792 | |
| 1793 | |
| 1794 | Multimedia extensions |
| 1795 | --------------------- |
| 1796 | |
| 1797 | * The optional built-in modules audioop and imageop are now standard |
| 1798 | parts of the interpreter. Thanks to Sjoerd Mullender and Jack Jansen |
| 1799 | for contributing this code! |
| 1800 | |
| 1801 | * There's a new operation in audioop: minmax(). |
| 1802 | |
| 1803 | * There's a new built-in module called rgbimg which supports portable |
| 1804 | efficient reading of SGI RCG image files. Thanks also to Paul |
| 1805 | Haeberli for the original code! (Who will contribute a GIF reader?) |
| 1806 | |
| 1807 | * The module aifc is gone -- you should now always use aifc, which has |
| 1808 | received a facelift. |
| 1809 | |
| 1810 | * There's a new module sunau., for reading Sun (and NeXT) audio files. |
| 1811 | |
| 1812 | * There's a new module audiodev which provides a uniform interface to |
| 1813 | (SGI Indigo and Sun Sparc) audio hardware. |
| 1814 | |
| 1815 | * There's a new module sndhdr which recognizes various sound files by |
| 1816 | looking in their header and checking for various magic words. |
| 1817 | |
| 1818 | |
| 1819 | Optimizations |
| 1820 | ------------- |
| 1821 | |
| 1822 | * Most optimizations below can be configured by compile-time flags. |
| 1823 | Thanks to Sjoerd Mullender for submitting these optimizations! |
| 1824 | |
| 1825 | * Small integers (default -1..99) are shared -- i.e. if two different |
| 1826 | functions compute the same value it is possible (but not |
| 1827 | guaranteed!!!) that they return the same *object*. Python programs |
| 1828 | can detect this but should *never* rely on it. |
| 1829 | |
| 1830 | * Empty tuples (which all compare equal) are shared in the same |
| 1831 | manner. |
| 1832 | |
| 1833 | * Tuples of size up to 20 (default) are put in separate free lists |
| 1834 | when deallocated. |
| 1835 | |
| 1836 | * There is a compile-time option to cache a string's hash function, |
| 1837 | but this appeared to have a negligeable effect, and as it costs 4 |
| 1838 | bytes per string it is disabled by default. |
| 1839 | |
| 1840 | |
| 1841 | Embedding Python |
| 1842 | ---------------- |
| 1843 | |
| 1844 | * The initialization interface has been simplified somewhat. You now |
| 1845 | only call "initall()" to initialize the interpreter. |
| 1846 | |
| 1847 | * The previously announced renaming of externally visible identifiers |
| 1848 | has not been carried out. It will happen in a later release. Sorry. |
| 1849 | |
| 1850 | |
| 1851 | Miscellaneous bugs that have been fixed |
| 1852 | --------------------------------------- |
| 1853 | |
| 1854 | * All known portability bugs. |
| 1855 | |
| 1856 | * Version 0.9.9 dumped core in <listobject>.sort() which has been |
| 1857 | fixed. Thanks to Jaap Vermeulen for fixing this and posting the fix |
| 1858 | on the mailing list while I was away! |
| 1859 | |
| 1860 | * Core dump on a format string ending in '%', e.g. in the expression |
| 1861 | '%' % None. |
| 1862 | |
| 1863 | * The array module yielded a bogus result for concatenation (a+b would |
| 1864 | yield a+a). |
| 1865 | |
| 1866 | * Some serious memory leaks in strop.split() and strop.splitfields(). |
| 1867 | |
| 1868 | * Several problems with the nis module. |
| 1869 | |
| 1870 | * Subtle problem when copying a class method from another class |
| 1871 | through assignment (the method could not be called). |
| 1872 | |
| 1873 | |
| 1874 | Remaining bugs |
| 1875 | -------------- |
| 1876 | |
| 1877 | * One problem with 64-bit machines remains -- since .pyc files are |
| 1878 | portable and use only 4 bytes to represent an integer object, 64-bit |
| 1879 | integer literals are silently truncated when written into a .pyc file. |
| 1880 | Work-around: use eval('123456789101112'). |
| 1881 | |
| 1882 | * The freeze script doesn't work any more. A new and more portable |
| 1883 | one can probably be cooked up using tricks from Extensions/mkext.py. |
| 1884 | |
| 1885 | * The dos support hasn't been tested yet. (Really Soon Now we should |
| 1886 | have a PC with a working C compiler!) |
| 1887 | |
| 1888 | |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 1889 | =================================== |
| 1890 | ==> Release 0.9.9 (29 Jul 1993) <== |
| 1891 | =================================== |
| 1892 | |
| 1893 | I *believe* these are the main user-visible changes in this release, |
| 1894 | but there may be others. SGI users may scan the {src,lib}/ChangeLog |
| 1895 | files for improvements of some SGI specific modules, e.g. aifc and |
| 1896 | cl. Developers of extension modules should also read src/ChangeLog. |
| 1897 | |
| 1898 | |
| 1899 | Naming of C symbols used by the Python interpreter |
| 1900 | -------------------------------------------------- |
| 1901 | |
| 1902 | * This is the last release using the current naming conventions. New |
| 1903 | naming conventions are explained in the file misc/NAMING. |
| 1904 | Summarizing, all externally visible symbols get (at least) a "Py" |
| 1905 | prefix, and most functions are renamed to the standard form |
| 1906 | PyModule_FunctionName. |
| 1907 | |
| 1908 | * Writers of extensions are urged to start using the new naming |
| 1909 | conventions. The next release will use the new naming conventions |
| 1910 | throughout (it will also have a different source directory |
| 1911 | structure). |
| 1912 | |
| 1913 | * As a result of the preliminary work for the great renaming, many |
| 1914 | functions that were accidentally global have been made static. |
| 1915 | |
| 1916 | |
| 1917 | BETA X11 support |
| 1918 | ---------------- |
| 1919 | |
| 1920 | * There are now modules interfacing to the X11 Toolkit Intrinsics, the |
| 1921 | Athena widgets, and the Motif 1.1 widget set. These are not yet |
| 1922 | documented except through the examples and README file in the demo/x11 |
| 1923 | directory. It is expected that this interface will be replaced by a |
| 1924 | more powerful and correct one in the future, which may or may not be |
| 1925 | backward compatible. In other words, this part of the code is at most |
| 1926 | BETA level software! (Note: the rest of Python is rock solid as ever!) |
| 1927 | |
| 1928 | * I understand that the above may be a bit of a disappointment, |
| 1929 | however my current schedule does not allow me to change this situation |
| 1930 | before putting the release out of the door. By releasing it |
| 1931 | undocumented and buggy, at least some of the (working!) demo programs, |
| 1932 | like itr (my Internet Talk Radio browser) become available to a larger |
| 1933 | audience. |
| 1934 | |
| 1935 | * There are also modules interfacing to SGI's "Glx" widget (a GL |
| 1936 | window wrapped in a widget) and to NCSA's "HTML" widget (which can |
| 1937 | format HyperText Markup Language, the document format used by the |
| 1938 | World Wide Web). |
| 1939 | |
| 1940 | * I've experienced some problems when building the X11 support. In |
| 1941 | particular, the Xm and Xaw widget sets don't go together, and it |
| 1942 | appears that using X11R5 is better than using X11R4. Also the threads |
| 1943 | module and its link time options may spoil things. My own strategy is |
| 1944 | to build two Python binaries: one for use with X11 and one without |
| 1945 | it, which can contain a richer set of built-in modules. Don't even |
| 1946 | *think* of loading the X11 modules dynamically... |
| 1947 | |
| 1948 | |
| 1949 | Environmental changes |
| 1950 | --------------------- |
| 1951 | |
| 1952 | * Compiled files (*.pyc files) created by this Python version are |
| 1953 | incompatible with those created by the previous version. Both |
| 1954 | versions detect this and silently create a correct version, but it |
| 1955 | means that it is not a good idea to use the same library directory for |
| 1956 | an old and a new interpreter, since they will start to "fight" over |
| 1957 | the *.pyc files... |
| 1958 | |
| 1959 | * When a stack trace is printed, the exception is printed last instead |
| 1960 | of first. This means that if the beginning of the stack trace |
| 1961 | scrolled out of your window you can still see what exception caused |
| 1962 | it. |
| 1963 | |
| 1964 | * Sometimes interrupting a Python operation does not work because it |
| 1965 | hangs in a blocking system call. You can now kill the interpreter by |
| 1966 | interrupting it three times. The second time you interrupt it, a |
| 1967 | message will be printed telling you that the third interrupt will kill |
| 1968 | the interpreter. The "sys.exitfunc" feature still makes limited |
| 1969 | clean-up possible in this case. |
| 1970 | |
| 1971 | |
| 1972 | Changes to the command line interface |
| 1973 | ------------------------------------- |
| 1974 | |
| 1975 | * The python usage message is now much more informative. |
| 1976 | |
| 1977 | * New option -i enters interactive mode after executing a script -- |
| 1978 | useful for debugging. |
| 1979 | |
| 1980 | * New option -k raises an exception when an expression statement |
| 1981 | yields a value other than None. |
| 1982 | |
| 1983 | * For each option there is now also a corresponding environment |
| 1984 | variable. |
| 1985 | |
| 1986 | |
| 1987 | Using Python as an embedded language |
| 1988 | ------------------------------------ |
| 1989 | |
| 1990 | * The distribution now contains (some) documentation on the use of |
| 1991 | Python as an "embedded language" in other applications, as well as a |
| 1992 | simple example. See the file misc/EMBEDDING and the directory embed/. |
| 1993 | |
| 1994 | |
| 1995 | Speed improvements |
| 1996 | ------------------ |
| 1997 | |
| 1998 | * Function local variables are now generally stored in an array and |
| 1999 | accessed using an integer indexing operation, instead of through a |
| 2000 | dictionary lookup. (This compensates the somewhat slower dictionary |
| 2001 | lookup caused by the generalization of the dictionary module.) |
| 2002 | |
| 2003 | |
| 2004 | Changes to the syntax |
| 2005 | --------------------- |
| 2006 | |
| 2007 | * Continuation lines can now *sometimes* be written without a |
| 2008 | backslash: if the continuation is contained within nesting (), [] or |
| 2009 | {} brackets the \ may be omitted. There's a much improved |
| 2010 | python-mode.el in the misc directory which knows about this as well. |
| 2011 | |
| 2012 | * You can no longer use an empty set of parentheses to define a class |
| 2013 | without base classes. That is, you no longer write this: |
| 2014 | |
| 2015 | class Foo(): # syntax error |
| 2016 | ... |
| 2017 | |
| 2018 | You must write this instead: |
| 2019 | |
| 2020 | class Foo: |
| 2021 | ... |
| 2022 | |
| 2023 | This was already the preferred syntax in release 0.9.8 but many |
| 2024 | people seemed not to have picked it up. There's a Python script that |
| 2025 | fixes old code: demo/scripts/classfix.py. |
| 2026 | |
| 2027 | * There's a new reserved word: "access". The syntax and semantics are |
| 2028 | still subject of of research and debate (as well as undocumented), but |
| 2029 | the parser knows about the keyword so you must not use it as a |
| 2030 | variable, function, or attribute name. |
| 2031 | |
| 2032 | |
| 2033 | Changes to the semantics of the language proper |
| 2034 | ----------------------------------------------- |
| 2035 | |
| 2036 | * The following compatibility hack is removed: if a function was |
| 2037 | defined with two or more arguments, and called with a single argument |
| 2038 | that was a tuple with just as many arguments, the items of this tuple |
| 2039 | would be used as the arguments. This is no longer supported. |
| 2040 | |
| 2041 | |
| 2042 | Changes to the semantics of classes and instances |
| 2043 | ------------------------------------------------- |
| 2044 | |
| 2045 | * Class variables are now also accessible as instance variables for |
| 2046 | reading (assignment creates an instance variable which overrides the |
| 2047 | class variable of the same name though). |
| 2048 | |
| 2049 | * If a class attribute is a user-defined function, a new kind of |
| 2050 | object is returned: an "unbound method". This contains a pointer to |
| 2051 | the class and can only be called with a first argument which is a |
| 2052 | member of that class (or a derived class). |
| 2053 | |
| 2054 | * If a class defines a method __init__(self, arg1, ...) then this |
| 2055 | method is called when a class instance is created by the classname() |
| 2056 | construct. Arguments passed to classname() are passed to the |
| 2057 | __init__() method. The __init__() methods of base classes are not |
| 2058 | automatically called; the derived __init__() method must call these if |
| 2059 | necessary (this was done so the derived __init__() method can choose |
| 2060 | the call order and arguments for the base __init__() methods). |
| 2061 | |
| 2062 | * If a class defines a method __del__(self) then this method is called |
| 2063 | when an instance of the class is about to be destroyed. This makes it |
| 2064 | possible to implement clean-up of external resources attached to the |
| 2065 | instance. As with __init__(), the __del__() methods of base classes |
| 2066 | are not automatically called. If __del__ manages to store a reference |
| 2067 | to the object somewhere, its destruction is postponed; when the object |
| 2068 | is again about to be destroyed its __del__() method will be called |
| 2069 | again. |
| 2070 | |
| 2071 | * Classes may define a method __hash__(self) to allow their instances |
| 2072 | to be used as dictionary keys. This must return a 32-bit integer. |
| 2073 | |
| 2074 | |
| 2075 | Minor improvements |
| 2076 | ------------------ |
| 2077 | |
| 2078 | * Function and class objects now know their name (the name given in |
| 2079 | the 'def' or 'class' statement that created them). |
| 2080 | |
| 2081 | * Class instances now know their class name. |
| 2082 | |
| 2083 | |
| 2084 | Additions to built-in operations |
| 2085 | -------------------------------- |
| 2086 | |
| 2087 | * The % operator with a string left argument implements formatting |
| 2088 | similar to sprintf() in C. The right argument is either a single |
| 2089 | value or a tuple of values. All features of Standard C sprintf() are |
| 2090 | supported except %p. |
| 2091 | |
| 2092 | * Dictionaries now support almost any key type, instead of just |
| 2093 | strings. (The key type must be an immutable type or must be a class |
| 2094 | instance where the class defines a method __hash__(), in order to |
| 2095 | avoid losing track of keys whose value may change.) |
| 2096 | |
| 2097 | * Built-in methods are now compared properly: when comparing x.meth1 |
| 2098 | and y.meth2, if x is equal to y and the methods are defined by the |
| 2099 | same function, x.meth1 compares equal to y.meth2. |
| 2100 | |
| 2101 | |
| 2102 | Additions to built-in functions |
| 2103 | ------------------------------- |
| 2104 | |
| 2105 | * str(x) returns a string version of its argument. If the argument is |
| 2106 | a string it is returned unchanged, otherwise it returns `x`. |
| 2107 | |
| 2108 | * repr(x) returns the same as `x`. (Some users found it easier to |
| 2109 | have this as a function.) |
| 2110 | |
| 2111 | * round(x) returns the floating point number x rounded to an whole |
| 2112 | number, represented as a floating point number. round(x, n) returns x |
| 2113 | rounded to n digits. |
| 2114 | |
| 2115 | * hasattr(x, name) returns true when x has an attribute with the given |
| 2116 | name. |
| 2117 | |
| 2118 | * hash(x) returns a hash code (32-bit integer) of an arbitrary |
| 2119 | immutable object's value. |
| 2120 | |
| 2121 | * id(x) returns a unique identifier (32-bit integer) of an arbitrary |
| 2122 | object. |
| 2123 | |
| 2124 | * compile() compiles a string to a Python code object. |
| 2125 | |
| 2126 | * exec() and eval() now support execution of code objects. |
| 2127 | |
| 2128 | |
| 2129 | Changes to the documented part of the library (standard modules) |
| 2130 | ---------------------------------------------------------------- |
| 2131 | |
| 2132 | * os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so |
| 2133 | the border case '/foo/..' returns '/' instead of ''. |
| 2134 | |
| 2135 | * A new function string.find() is added with similar semantics to |
| 2136 | string.index(); however when it does not find the given substring it |
| 2137 | returns -1 instead of raising string.index_error. |
| 2138 | |
| 2139 | |
| 2140 | Changes to built-in modules |
| 2141 | --------------------------- |
| 2142 | |
| 2143 | * New optional module 'array' implements operations on sequences of |
| 2144 | integers or floating point numbers of a particular size. This is |
| 2145 | useful to manipulate large numerical arrays or to read and write |
| 2146 | binary files consisting of numerical data. |
| 2147 | |
| 2148 | * Regular expression objects created by module regex now support a new |
| 2149 | method named group(), which returns one or more \(...\) groups by number. |
| 2150 | The number of groups is increased from 10 to 100. |
| 2151 | |
| 2152 | * Function compile() in module regex now supports an optional mapping |
| 2153 | argument; a variable casefold is added to the module which can be used |
| 2154 | as a standard uppercase to lowercase mapping. |
| 2155 | |
| 2156 | * Module time now supports many routines that are defined in the |
| 2157 | Standard C time interface (<time.h>): gmtime(), localtime(), |
| 2158 | asctime(), ctime(), mktime(), as well as these variables (taken from |
| 2159 | System V): timezone, altzone, daylight and tzname. (The corresponding |
| 2160 | functions in the undocumented module calendar have been removed; the |
| 2161 | undocumented and unfinished module tzparse is now obsolete and will |
| 2162 | disappear in a future release.) |
| 2163 | |
| 2164 | * Module strop (the fast built-in version of standard module string) |
| 2165 | now uses C's definition of whitespace instead of fixing it to space, |
| 2166 | tab and newline; in practice this usually means that vertical tab, |
| 2167 | form feed and return are now also considered whitespace. It exports |
| 2168 | the string of characters that are considered whitespace as well as the |
| 2169 | characters that are considered lowercase or uppercase. |
| 2170 | |
| 2171 | * Module sys now defines the variable builtin_module_names, a list of |
| 2172 | names of modules built into the current interpreter (including not |
| 2173 | yet imported, but excluding two special modules that always have to be |
| 2174 | defined -- sys and builtin). |
| 2175 | |
| 2176 | * Objects created by module sunaudiodev now also support flush() and |
| 2177 | close() methods. |
| 2178 | |
| 2179 | * Socket objects created by module socket now support an optional |
| 2180 | flags argument for their methods sendto() and recvfrom(). |
| 2181 | |
| 2182 | * Module marshal now supports dumping to and loading from strings, |
| 2183 | through the functions dumps() and loads(). |
| 2184 | |
| 2185 | * Module stdwin now supports some new functionality. You may have to |
| 2186 | ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.) |
| 2187 | |
| 2188 | |
| 2189 | Bugs fixed |
| 2190 | ---------- |
| 2191 | |
| 2192 | * Fixed comparison of negative long integers. |
| 2193 | |
| 2194 | * The tokenizer no longer botches input lines longer than BUFSIZ. |
| 2195 | |
| 2196 | * Fixed several severe memory leaks in module select. |
| 2197 | |
| 2198 | * Fixed memory leaks in modules socket and sv. |
| 2199 | |
| 2200 | * Fixed memory leak in divmod() for long integers. |
| 2201 | |
| 2202 | * Problems with definition of floatsleep() on Suns fixed. |
| 2203 | |
| 2204 | * Many portability bugs fixed (and undoubtedly new ones added :-). |
| 2205 | |
| 2206 | |
| 2207 | Changes to the build procedure |
| 2208 | ------------------------------ |
| 2209 | |
| 2210 | * The Makefile supports some new targets: "make default" and "make |
| 2211 | all". Both are by normally equivalent to "make python". |
| 2212 | |
| 2213 | * The Makefile no longer uses $> since it's not supported by all |
| 2214 | versions of Make. |
| 2215 | |
| 2216 | * The header files now all contain #ifdef constructs designed to make |
| 2217 | it safe to include the same header file twice, as well as support for |
| 2218 | inclusion from C++ programs (automatic extern "C" { ... } added). |
| 2219 | |
| 2220 | |
| 2221 | Freezing Python scripts |
| 2222 | ----------------------- |
| 2223 | |
| 2224 | * There is now some support for "freezing" a Python script as a |
| 2225 | stand-alone executable binary file. See the script |
| 2226 | demo/scripts/freeze.py. It will require some site-specific tailoring |
| 2227 | of the script to get this working, but is quite worthwhile if you write |
| 2228 | Python code for other who may not have built and installed Python. |
| 2229 | |
| 2230 | |
| 2231 | MS-DOS |
| 2232 | ------ |
| 2233 | |
| 2234 | * A new MS-DOS port has been done, using MSC 6.0 (I believe). Thanks, |
| 2235 | Marcel van der Peijl! This requires fewer compatibility hacks in |
| 2236 | posixmodule.c. The executable is not yet available but will be soon |
| 2237 | (check the mailing list). |
| 2238 | |
| 2239 | * The default PYTHONPATH has changed. |
| 2240 | |
| 2241 | |
| 2242 | Changes for developers of extension modules |
| 2243 | ------------------------------------------- |
| 2244 | |
| 2245 | * Read src/ChangeLog for full details. |
| 2246 | |
| 2247 | |
| 2248 | SGI specific changes |
| 2249 | -------------------- |
| 2250 | |
| 2251 | * Read src/ChangeLog for full details. |
| 2252 | |
Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 2253 | |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 2254 | ================================== |
| 2255 | ==> Release 0.9.8 (9 Jan 1993) <== |
| 2256 | ================================== |
| 2257 | |
| 2258 | I claim no completeness here, but I've tried my best to scan the log |
| 2259 | files throughout my source tree for interesting bits of news. A more |
| 2260 | complete account of the changes is to be found in the various |
| 2261 | ChangeLog files. See also "News for release 0.9.7beta" below if you're |
| 2262 | still using release 0.9.6, and the file HISTORY if you have an even |
| 2263 | older release. |
| 2264 | |
| 2265 | --Guido |
| 2266 | |
| 2267 | |
| 2268 | Changes to the language proper |
| 2269 | ------------------------------ |
| 2270 | |
| 2271 | There's only one big change: the conformance checking for function |
| 2272 | argument lists (of user-defined functions only) is stricter. Earlier, |
| 2273 | you could get away with the following: |
| 2274 | |
| 2275 | (a) define a function of one argument and call it with any |
| 2276 | number of arguments; if the actual argument count wasn't |
| 2277 | one, the function would receive a tuple containing the |
| 2278 | arguments arguments (an empty tuple if there were none). |
| 2279 | |
| 2280 | (b) define a function of two arguments, and call it with more |
| 2281 | than two arguments; if there were more than two arguments, |
| 2282 | the second argument would be passed as a tuple containing |
| 2283 | the second and further actual arguments. |
| 2284 | |
| 2285 | (Note that an argument (formal or actual) that is a tuple is counted as |
| 2286 | one; these rules don't apply inside such tuples, only at the top level |
| 2287 | of the argument list.) |
| 2288 | |
| 2289 | Case (a) was needed to accommodate variable-length argument lists; |
| 2290 | there is now an explicit "varargs" feature (precede the last argument |
| 2291 | with a '*'). Case (b) was needed for compatibility with old class |
| 2292 | definitions: up to release 0.9.4 a method with more than one argument |
| 2293 | had to be declared as "def meth(self, (arg1, arg2, ...)): ...". |
| 2294 | Version 0.9.6 provide better ways to handle both casees, bot provided |
| 2295 | backward compatibility; version 0.9.8 retracts the compatibility hacks |
| 2296 | since they also cause confusing behavior if a function is called with |
| 2297 | the wrong number of arguments. |
| 2298 | |
| 2299 | There's a script that helps converting classes that still rely on (b), |
| 2300 | provided their methods' first argument is called "self": |
| 2301 | demo/scripts/methfix.py. |
| 2302 | |
| 2303 | If this change breaks lots of code you have developed locally, try |
| 2304 | #defining COMPAT_HACKS in ceval.c. |
| 2305 | |
| 2306 | (There's a third compatibility hack, which is the reverse of (a): if a |
| 2307 | function is defined with two or more arguments, and called with a |
| 2308 | single argument that is a tuple with just as many arguments, the items |
| 2309 | of this tuple will be used as the arguments. Although this can (and |
| 2310 | should!) be done using the built-in function apply() instead, it isn't |
| 2311 | withdrawn yet.) |
| 2312 | |
| 2313 | |
| 2314 | One minor change: comparing instance methods works like expected, so |
| 2315 | that if x is an instance of a user-defined class and has a method m, |
| 2316 | then (x.m==x.m) yields 1. |
| 2317 | |
| 2318 | |
| 2319 | The following was already present in 0.9.7beta, but not explicitly |
| 2320 | mentioned in the NEWS file: user-defined classes can now define types |
| 2321 | that behave in almost allrespects like numbers. See |
| 2322 | demo/classes/Rat.py for a simple example. |
| 2323 | |
| 2324 | |
| 2325 | Changes to the build process |
| 2326 | ---------------------------- |
| 2327 | |
| 2328 | The Configure.py script and the Makefile has been made somewhat more |
| 2329 | bullet-proof, after reports of (minor) trouble on certain platforms. |
| 2330 | |
| 2331 | There is now a script to patch Makefile and config.c to add a new |
| 2332 | optional built-in module: Addmodule.sh. Read the script before using! |
| 2333 | |
| 2334 | Useing Addmodule.sh, all optional modules can now be configured at |
| 2335 | compile time using Configure.py, so there are no modules left that |
| 2336 | require dynamic loading. |
| 2337 | |
| 2338 | The Makefile has been fixed to make it easier to use with the VPATH |
| 2339 | feature of some Make versions (e.g. SunOS). |
| 2340 | |
| 2341 | |
| 2342 | Changes affecting portability |
| 2343 | ----------------------------- |
| 2344 | |
| 2345 | Several minor portability problems have been solved, e.g. "malloc.h" |
| 2346 | has been renamed to "mymalloc.h", "strdup.c" is no longer used, and |
| 2347 | the system now tolerates malloc(0) returning 0. |
| 2348 | |
| 2349 | For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now |
| 2350 | distributed with Python. This solves several minor problems, in |
| 2351 | particular scripts invoked using #! can now use dynamic loading. |
| 2352 | |
| 2353 | |
| 2354 | Changes to the interpreter interface |
| 2355 | ------------------------------------ |
| 2356 | |
| 2357 | On popular demand, there's finally a "profile" feature for interactive |
| 2358 | use of the interpreter. If the environment variable $PYTHONSTARTUP is |
| 2359 | set to the name of an existing file, Python statements in this file |
| 2360 | are executed when the interpreter is started in interactive mode. |
| 2361 | |
| 2362 | There is a new clean-up mechanism, complementing try...finally: if you |
| 2363 | assign a function object to sys.exitfunc, it will be called when |
| 2364 | Python exits or receives a SIGTERM or SIGHUP signal. |
| 2365 | |
| 2366 | The interpreter is now generally assumed to live in |
| 2367 | /usr/local/bin/python (as opposed to /usr/local/python). The script |
| 2368 | demo/scripts/fixps.py will update old scripts in place (you can easily |
| 2369 | modify it to do other similar changes). |
| 2370 | |
| 2371 | Most I/O that uses sys.stdin/stdout/stderr will now use any object |
| 2372 | assigned to those names as long as the object supports readline() or |
| 2373 | write() methods. |
| 2374 | |
| 2375 | The parser stack has been increased to 500 to accommodate more |
| 2376 | complicated expressions (7 levels used to be the practical maximum, |
| 2377 | it's now about 38). |
| 2378 | |
| 2379 | The limit on the size of the *run-time* stack has completely been |
| 2380 | removed -- this means that tuple or list displays can contain any |
| 2381 | number of elements (formerly more than 50 would crash the |
| 2382 | interpreter). |
| 2383 | |
| 2384 | |
| 2385 | Changes to existing built-in functions and methods |
| 2386 | -------------------------------------------------- |
| 2387 | |
| 2388 | The built-in functions int(), long(), float(), oct() and hex() now |
| 2389 | also apply to class instalces that define corresponding methods |
| 2390 | (__int__ etc.). |
| 2391 | |
| 2392 | |
| 2393 | New built-in functions |
| 2394 | ---------------------- |
| 2395 | |
| 2396 | The new functions str() and repr() convert any object to a string. |
| 2397 | The function repr(x) is in all respects equivalent to `x` -- some |
| 2398 | people prefer a function for this. The function str(x) does the same |
| 2399 | except if x is already a string -- then it returns x unchanged |
| 2400 | (repr(x) adds quotes and escapes "funny" characters as octal escapes). |
| 2401 | |
| 2402 | The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y. |
| 2403 | |
| 2404 | |
| 2405 | Changes to general built-in modules |
| 2406 | ----------------------------------- |
| 2407 | |
| 2408 | The time module's functions are more general: time() returns a |
| 2409 | floating point number and sleep() accepts one. Their accuracies |
| 2410 | depends on the precision of the system clock. Millisleep is no longer |
| 2411 | needed (although it still exists for now), but millitimer is still |
| 2412 | needed since on some systems wall clock time is only available with |
| 2413 | seconds precision, while a source of more precise time exists that |
| 2414 | isn't synchronized with the wall clock. (On UNIX systems that support |
| 2415 | the BSD gettimeofday() function, time.time() is as time.millitimer().) |
| 2416 | |
| 2417 | The string representation of a file object now includes an address: |
| 2418 | '<file 'filename', mode 'r' at #######>' where ###### is a hex number |
| 2419 | (the object's address) to make it unique. |
| 2420 | |
| 2421 | New functions added to posix: nice(), setpgrp(), and if your system |
| 2422 | supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp(). |
| 2423 | |
| 2424 | Improvements to the socket module: socket objects have new methods |
| 2425 | getpeername() and getsockname(), and the {get,set}sockopt methods can |
| 2426 | now get/set any kind of option using strings built with the new struct |
| 2427 | module. And there's a new function fromfd() which creates a socket |
| 2428 | object given a file descriptor (useful for servers started by inetd, |
| 2429 | which have a socket connected to stdin and stdout). |
| 2430 | |
| 2431 | |
| 2432 | Changes to SGI-specific built-in modules |
| 2433 | ---------------------------------------- |
| 2434 | |
| 2435 | The FORMS library interface (fl) now requires FORMS 2.1a. Some new |
| 2436 | functions have been added and some bugs have been fixed. |
| 2437 | |
| 2438 | Additions to al (audio library interface): added getname(), |
| 2439 | getdefault() and getminmax(). |
| 2440 | |
| 2441 | The gl modules doesn't call "foreground()" when initialized (this |
| 2442 | caused some problems) like it dit in 0.9.7beta (but not before). |
| 2443 | There's a new gl function 'gversion() which returns a version string. |
| 2444 | |
| 2445 | The interface to sv (Indigo video interface) has totally changed. |
| 2446 | (Sorry, still no documentation, but see the examples in |
| 2447 | demo/sgi/{sv,video}.) |
| 2448 | |
| 2449 | |
| 2450 | Changes to standard library modules |
| 2451 | ----------------------------------- |
| 2452 | |
| 2453 | Most functions in module string are now much faster: they're actually |
| 2454 | implemented in C. The module containing the C versions is called |
| 2455 | "strop" but you should still import "string" since strop doesn't |
| 2456 | provide all the interfaces defined in string (and strop may be renamed |
| 2457 | to string when it is complete in a future release). |
| 2458 | |
| 2459 | string.index() now accepts an optional third argument giving an index |
| 2460 | where to start searching in the first argument, so you can find second |
| 2461 | and further occurrences (this is similar to the regular expression |
| 2462 | functions in regex). |
| 2463 | |
| 2464 | The definition of what string.splitfields(anything, '') should return |
| 2465 | is changed for the last time: it returns a singleton list containing |
| 2466 | its whole first argument unchanged. This is compatible with |
| 2467 | regsub.split() which also ignores empty delimiter matches. |
| 2468 | |
| 2469 | posixpath, macpath: added dirname() and normpath() (and basename() to |
| 2470 | macpath). |
| 2471 | |
| 2472 | The mainloop module (for use with stdwin) can now demultiplex input |
| 2473 | from other sources, as long as they can be polled with select(). |
| 2474 | |
| 2475 | |
| 2476 | New built-in modules |
| 2477 | -------------------- |
| 2478 | |
| 2479 | Module struct defines functions to pack/unpack values to/from strings |
| 2480 | representing binary values in native byte order. |
| 2481 | |
| 2482 | Module strop implements C versions of many functions from string (see |
| 2483 | above). |
| 2484 | |
| 2485 | Optional module fcntl defines interfaces to fcntl() and ioctl() -- |
| 2486 | UNIX only. (Not yet properly documented -- see however src/fcntl.doc.) |
| 2487 | |
| 2488 | Optional module mpz defines an interface to an altaernative long |
| 2489 | integer implementation, the GNU MPZ library. |
| 2490 | |
| 2491 | Optional module md5 uses the GNU MPZ library to calculate MD5 |
| 2492 | signatures of strings. |
| 2493 | |
| 2494 | There are also optional new modules specific to SGI machines: imageop |
| 2495 | defines some simple operations to images represented as strings; sv |
| 2496 | interfaces to the Indigo video board; cl interfaces to the (yet |
| 2497 | unreleased) compression library. |
| 2498 | |
| 2499 | |
| 2500 | New standard library modules |
| 2501 | ---------------------------- |
| 2502 | |
| 2503 | (Unfortunately the following modules are not all documented; read the |
| 2504 | sources to find out more about them!) |
| 2505 | |
| 2506 | autotest: run testall without showing any output unless it differs |
| 2507 | from the expected output |
| 2508 | |
| 2509 | bisect: use bisection to insert or find an item in a sorted list |
| 2510 | |
| 2511 | colorsys: defines conversions between various color systems (e.g. RGB |
| 2512 | <-> YUV) |
| 2513 | |
| 2514 | nntplib: a client interface to NNTP servers |
| 2515 | |
| 2516 | pipes: utility to construct pipeline from templates, e.g. for |
| 2517 | conversion from one file format to another using several utilities. |
| 2518 | |
| 2519 | regsub: contains three functions that are more or less compatible with |
| 2520 | awk functions of the same name: sub() and gsub() do string |
| 2521 | substitution, split() splits a string using a regular expression to |
| 2522 | define how separators are define. |
| 2523 | |
| 2524 | test_types: test operations on the built-in types of Python |
| 2525 | |
| 2526 | toaiff: convert various audio file formats to AIFF format |
| 2527 | |
| 2528 | tzparse: parse the TZ environment parameter (this may be less general |
| 2529 | than it could be, let me know if you fix it). |
| 2530 | |
| 2531 | (Note that the obsolete module "path" no longer exists.) |
| 2532 | |
| 2533 | |
| 2534 | New SGI-specific library modules |
| 2535 | -------------------------------- |
| 2536 | |
| 2537 | CL: constants for use with the built-in compression library interface (cl) |
| 2538 | |
| 2539 | Queue: a multi-producer, multi-consumer queue class implemented for |
| 2540 | use with the built-in thread module |
| 2541 | |
| 2542 | SOCKET: constants for use with built-in module socket, e.g. to set/get |
| 2543 | socket options. This is SGI-specific because the constants to be |
| 2544 | passed are system-dependent. You can generate a version for your own |
| 2545 | system by running the script demo/scripts/h2py.py with |
| 2546 | /usr/include/sys/socket.h as input. |
| 2547 | |
| 2548 | cddb: interface to the database used the the CD player |
| 2549 | |
| 2550 | torgb: convert various image file types to rgb format (requires pbmplus) |
| 2551 | |
| 2552 | |
| 2553 | New demos |
| 2554 | --------- |
| 2555 | |
| 2556 | There's an experimental interface to define Sun RPC clients and |
| 2557 | servers in demo/rpc. |
| 2558 | |
| 2559 | There's a collection of interfaces to WWW, WAIS and Gopher (both |
| 2560 | Python classes and program providing a user interface) in demo/www. |
| 2561 | This includes a program texi2html.py which converts texinfo files to |
| 2562 | HTML files (the format used hy WWW). |
| 2563 | |
| 2564 | The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse. |
| 2565 | |
| 2566 | For SGI systems, there's a whole collection of programs and classes |
| 2567 | that make use of the Indigo video board in demo/sgi/{sv,video}. This |
| 2568 | represents a significant amount of work that we're giving away! |
| 2569 | |
| 2570 | There are demos "rsa" and "md5test" that exercise the mpz and md5 |
| 2571 | modules, respectively. The rsa demo is a complete implementation of |
| 2572 | the RSA public-key cryptosystem! |
| 2573 | |
| 2574 | A bunch of games and examples submitted by Stoffel Erasmus have been |
| 2575 | included in demo/stoffel. |
| 2576 | |
| 2577 | There are miscellaneous new files in some existing demo |
| 2578 | subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py, |
| 2579 | sgi/al/cmpaf.py, sockets/{mcast,gopher}.py. |
| 2580 | |
| 2581 | There are also many minor changes to existing files, but I'm too lazy |
| 2582 | to run a diff and note the differences -- you can do this yourself if |
| 2583 | you save the old distribution's demos. One highlight: the |
| 2584 | stdwin/python.py demo is much improved! |
| 2585 | |
| 2586 | |
| 2587 | Changes to the documentation |
| 2588 | ---------------------------- |
| 2589 | |
| 2590 | The LaTeX source for the library uses different macros to enable it to |
| 2591 | be converted to texinfo, and from there to INFO or HTML format so it |
| 2592 | can be browsed as a hypertext. The net result is that you can now |
| 2593 | read the Python library documentation in Emacs info mode! |
| 2594 | |
| 2595 | |
| 2596 | Changes to the source code that affect C extension writers |
| 2597 | ---------------------------------------------------------- |
| 2598 | |
| 2599 | The function strdup() no longer exists (it was used only in one places |
| 2600 | and is somewhat of a a portability problem sice some systems have the |
| 2601 | same function in their C library. |
| 2602 | |
| 2603 | The functions NEW() and RENEW() allocate one spare byte to guard |
| 2604 | against a NULL return from malloc(0) being taken for an error, but |
| 2605 | this should not be relied upon. |
| 2606 | |
| 2607 | |
| 2608 | ========================= |
| 2609 | ==> Release 0.9.7beta <== |
| 2610 | ========================= |
| 2611 | |
| 2612 | |
| 2613 | Changes to the language proper |
| 2614 | ------------------------------ |
| 2615 | |
| 2616 | User-defined classes can now implement operations invoked through |
| 2617 | special syntax, such as x[i] or `x` by defining methods named |
| 2618 | __getitem__(self, i) or __repr__(self), etc. |
| 2619 | |
| 2620 | |
| 2621 | Changes to the build process |
| 2622 | ---------------------------- |
| 2623 | |
| 2624 | Instead of extensive manual editing of the Makefile to select |
| 2625 | compile-time options, you can now run a Configure.py script. |
| 2626 | The Makefile as distributed builds a minimal interpreter sufficient to |
| 2627 | run Configure.py. See also misc/BUILD |
| 2628 | |
| 2629 | The Makefile now includes more "utility" targets, e.g. install and |
| 2630 | tags/TAGS |
| 2631 | |
| 2632 | Using the provided strtod.c and strtol.c are now separate options, as |
| 2633 | on the Sun the provided strtod.c dumps core :-( |
| 2634 | |
| 2635 | The regex module is now an option chosen by the Makefile, since some |
| 2636 | (old) C compilers choke on regexpr.c |
| 2637 | |
| 2638 | |
| 2639 | Changes affecting portability |
| 2640 | ----------------------------- |
| 2641 | |
| 2642 | You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin |
| 2643 | interface |
| 2644 | |
| 2645 | Dynamic loading is now supported for Sun (and other non-COFF systems) |
| 2646 | throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's |
| 2647 | DL is out, 1.4) |
| 2648 | |
| 2649 | The system-dependent code for the use of the select() system call is |
| 2650 | moved to one file: myselect.h |
| 2651 | |
| 2652 | Thanks to Jaap Vermeulen, the code should now port cleanly to the |
| 2653 | SEQUENT |
| 2654 | |
| 2655 | |
| 2656 | Changes to the interpreter interface |
| 2657 | ------------------------------------ |
| 2658 | |
| 2659 | The interpretation of $PYTHONPATH in the environment is different: it |
| 2660 | is inserted in front of the default path instead of overriding it |
| 2661 | |
| 2662 | |
| 2663 | Changes to existing built-in functions and methods |
| 2664 | -------------------------------------------------- |
| 2665 | |
| 2666 | List objects now support an optional argument to their sort() method, |
| 2667 | which is a comparison function similar to qsort(3) in C |
| 2668 | |
| 2669 | File objects now have a method fileno(), used by the new select module |
| 2670 | (see below) |
| 2671 | |
| 2672 | |
| 2673 | New built-in function |
| 2674 | --------------------- |
| 2675 | |
| 2676 | coerce(x, y): take two numbers and return a tuple containing them |
| 2677 | both converted to a common type |
| 2678 | |
| 2679 | |
| 2680 | Changes to built-in modules |
| 2681 | --------------------------- |
| 2682 | |
| 2683 | sys: fixed core dumps in settrace() and setprofile() |
| 2684 | |
| 2685 | socket: added socket methods setsockopt() and getsockopt(); and |
| 2686 | fileno(), used by the new select module (see below) |
| 2687 | |
| 2688 | stdwin: added fileno() == connectionnumber(), in support of new module |
| 2689 | select (see below) |
| 2690 | |
| 2691 | posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function. |
| 2692 | |
| 2693 | gl: added qgetfd() |
| 2694 | |
| 2695 | fl: added several new functions, fixed several obscure bugs, adapted |
| 2696 | to FORMS 2.1 |
| 2697 | |
| 2698 | |
| 2699 | Changes to standard modules |
| 2700 | --------------------------- |
| 2701 | |
| 2702 | posixpath: changed implementation of ismount() |
| 2703 | |
| 2704 | string: atoi() no longer mistakes leading zero for octal number |
| 2705 | |
| 2706 | ... |
| 2707 | |
| 2708 | |
| 2709 | New built-in modules |
| 2710 | -------------------- |
| 2711 | |
| 2712 | Modules marked "dynamic only" are not configured at compile time but |
| 2713 | can be loaded dynamically. You need to turn on the DL or DLD option in |
| 2714 | the Makefile for support dynamic loading of modules (this requires |
| 2715 | external code). |
| 2716 | |
| 2717 | select: interfaces to the BSD select() system call |
| 2718 | |
| 2719 | dbm: interfaces to the (new) dbm library (dynamic only) |
| 2720 | |
| 2721 | nis: interfaces to some NIS functions (aka yellow pages) |
| 2722 | |
| 2723 | thread: limited form of multiple threads (sgi only) |
| 2724 | |
| 2725 | audioop: operations useful for audio programs, e.g. u-LAW and ADPCM |
| 2726 | coding (dynamic only) |
| 2727 | |
| 2728 | cd: interface to Indigo SCSI CDROM player audio library (sgi only) |
| 2729 | |
| 2730 | jpeg: read files in JPEG format (dynamic only, sgi only; needs |
| 2731 | external code) |
| 2732 | |
| 2733 | imgfile: read SGI image files (dynamic only, sgi only) |
| 2734 | |
| 2735 | sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only) |
| 2736 | |
| 2737 | sv: interface to Indigo video library (sgi only) |
| 2738 | |
| 2739 | pc: a minimal set of MS-DOS interfaces (MS-DOS only) |
| 2740 | |
| 2741 | rotor: encryption, by Lance Ellinghouse (dynamic only) |
| 2742 | |
| 2743 | |
| 2744 | New standard modules |
| 2745 | -------------------- |
| 2746 | |
| 2747 | Not all these modules are documented. Read the source: |
| 2748 | lib/<modulename>.py. Sometimes a file lib/<modulename>.doc contains |
| 2749 | additional documentation. |
| 2750 | |
| 2751 | imghdr: recognizes image file headers |
| 2752 | |
| 2753 | sndhdr: recognizes sound file headers |
| 2754 | |
| 2755 | profile: print run-time statistics of Python code |
| 2756 | |
| 2757 | readcd, cdplayer: companion modules for built-in module cd (sgi only) |
| 2758 | |
| 2759 | emacs: interface to Emacs using py-connect.el (see below). |
| 2760 | |
| 2761 | SOCKET: symbolic constant definitions for socket options |
| 2762 | |
| 2763 | SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only) |
| 2764 | |
| 2765 | SV: symbolic constat definitions for sv (sgi only) |
| 2766 | |
| 2767 | CD: symbolic constat definitions for cd (sgi only) |
| 2768 | |
| 2769 | |
| 2770 | New demos |
| 2771 | --------- |
| 2772 | |
| 2773 | scripts/pp.py: execute Python as a filter with a Perl-like command |
| 2774 | line interface |
| 2775 | |
| 2776 | classes/: examples using the new class features |
| 2777 | |
| 2778 | threads/: examples using the new thread module |
| 2779 | |
| 2780 | sgi/cd/: examples using the new cd module |
| 2781 | |
| 2782 | |
| 2783 | Changes to the documentation |
| 2784 | ---------------------------- |
| 2785 | |
| 2786 | The last-minute syntax changes of release 0.9.6 are now reflected |
| 2787 | everywhere in the manuals |
| 2788 | |
| 2789 | The reference manual has a new section (3.2) on implementing new kinds |
| 2790 | of numbers, sequences or mappings with user classes |
| 2791 | |
| 2792 | Classes are now treated extensively in the tutorial (chapter 9) |
| 2793 | |
| 2794 | Slightly restructured the system-dependent chapters of the library |
| 2795 | manual |
| 2796 | |
| 2797 | The file misc/EXTENDING incorporates documentation for mkvalue() and |
| 2798 | a new section on error handling |
| 2799 | |
| 2800 | The files misc/CLASSES and misc/ERRORS are no longer necessary |
| 2801 | |
| 2802 | The doc/Makefile now creates PostScript files automatically |
| 2803 | |
| 2804 | |
| 2805 | Miscellaneous changes |
| 2806 | --------------------- |
| 2807 | |
| 2808 | Incorporated Tim Peters' changes to python-mode.el, it's now version |
| 2809 | 1.06 |
| 2810 | |
| 2811 | A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python |
| 2812 | program running in an Emacs buffer execute Emacs lisp code. The |
| 2813 | necessary Python code is in lib/emacs.py. The Emacs code is |
| 2814 | misc/py-connect.el (it needs some external Emacs lisp code) |
| 2815 | |
| 2816 | |
| 2817 | Changes to the source code that affect C extension writers |
| 2818 | ---------------------------------------------------------- |
| 2819 | |
| 2820 | New service function mkvalue() to construct a Python object from C |
| 2821 | values according to a "format" string a la getargs() |
| 2822 | |
| 2823 | Most functions from pythonmain.c moved to new pythonrun.c which is |
| 2824 | in libpython.a. This should make embedded versions of Python easier |
| 2825 | |
| 2826 | ceval.h is split in eval.h (which needs compile.h and only declares |
| 2827 | eval_code) and ceval.h (which doesn't need compile.hand declares the |
| 2828 | rest) |
| 2829 | |
| 2830 | ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to |
| 2831 | improve the parallellism of multi-threaded programs by letting other |
| 2832 | Python code run when a blocking system call or something similar is |
| 2833 | made) |
| 2834 | |
| 2835 | In structmember.[ch], new member types BYTE, CHAR and unsigned |
| 2836 | variants have been added |
| 2837 | |
| 2838 | New file xxmodule.c is a template for new extension modules. |
| 2839 | |
Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 2840 | |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 2841 | ================================== |
| 2842 | ==> RELEASE 0.9.6 (6 Apr 1992) <== |
| 2843 | ================================== |
| 2844 | |
| 2845 | Misc news in 0.9.6: |
| 2846 | - Restructured the misc subdirectory |
| 2847 | - Reference manual completed, library manual much extended (with indexes!) |
| 2848 | - the GNU Readline library is now distributed standard with Python |
| 2849 | - the script "../demo/scripts/classfix.py" fixes Python modules using old |
| 2850 | class syntax |
| 2851 | - Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!) |
| 2852 | - Because of the GNU copyleft business I am not using the GNU regular |
| 2853 | expression implementation but a free re-implementation by Tatu Ylonen |
| 2854 | that recently appeared in comp.sources.misc (Bravo, Tatu!) |
| 2855 | |
| 2856 | New features in 0.9.6: |
| 2857 | - stricter try stmt syntax: cannot mix except and finally clauses on 1 try |
| 2858 | - New module 'os' supplants modules 'mac' and 'posix' for most cases; |
| 2859 | module 'path' is replaced by 'os.path' |
| 2860 | - os.path.split() return value differs from that of old path.split() |
| 2861 | - sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception |
| 2862 | currently being handled |
| 2863 | - sys.last_type, sys.last_value, sys.last_traceback remember last unhandled |
| 2864 | exception |
| 2865 | - New function string.expandtabs() expands tabs in a string |
| 2866 | - Added times() interface to posix (user & sys time of process & children) |
| 2867 | - Added uname() interface to posix (returns OS type, hostname, etc.) |
| 2868 | - New built-in function execfile() is like exec() but from a file |
| 2869 | - Functions exec() and eval() are less picky about whitespace/newlines |
| 2870 | - New built-in functions getattr() and setattr() access arbitrary attributes |
| 2871 | - More generic argument handling in built-in functions (see "./EXTENDING") |
| 2872 | - Dynamic loading of modules written in C or C++ (see "./DYNLOAD") |
| 2873 | - Division and modulo for long and plain integers with negative operands |
| 2874 | have changed; a/b is now floor(float(a)/float(b)) and a%b is defined |
| 2875 | as a-(a/b)*b. So now the outcome of divmod(a,b) is the same as |
| 2876 | (a/b, a%b) for integers. For floats, % is also changed, but of course |
| 2877 | / is unchanged, and divmod(x,y) does not yield (x/y, x%y)... |
| 2878 | - A function with explicit variable-length argument list can be declared |
| 2879 | like this: def f(*args): ...; or even like this: def f(a, b, *rest): ... |
| 2880 | - Code tracing and profiling features have been added, and two source |
| 2881 | code debuggers are provided in the library (pdb.py, tty-oriented, |
| 2882 | and wdb, window-oriented); you can now step through Python programs! |
| 2883 | See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc" |
| 2884 | - '==' is now the only equality operator; "../demo/scripts/eqfix.py" is |
| 2885 | a script that fixes old Python modules |
| 2886 | - Plain integer right shift now uses sign extension |
| 2887 | - Long integer shift/mask operations now simulate 2's complement |
| 2888 | to give more useful results for negative operands |
| 2889 | - Changed/added range checks for long/plain integer shifts |
| 2890 | - Options found after "-c command" are now passed to the command in sys.argv |
| 2891 | (note subtle incompatiblity with "python -c command -- -options"!) |
| 2892 | - Module stdwin is better protected against touching objects after they've |
| 2893 | been closed; menus can now also be closed explicitly |
| 2894 | - Stdwin now uses its own exception (stdwin.error) |
| 2895 | |
| 2896 | New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992): |
| 2897 | - dictionary objects can now be compared properly; e.g., {}=={} is true |
| 2898 | - new exception SystemExit causes termination if not caught; |
| 2899 | it is raised by sys.exit() so that 'finally' clauses can clean up, |
| 2900 | and it may even be caught. It does work interactively! |
| 2901 | - new module "regex" implements GNU Emacs style regular expressions; |
| 2902 | module "regexp" is rewritten in Python for backward compatibility |
| 2903 | - formal parameter lists may contain trailing commas |
| 2904 | |
| 2905 | Bugs fixed in 0.9.6: |
| 2906 | - assigning to or deleting a list item with a negative index dumped core |
| 2907 | - divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L) |
| 2908 | |
| 2909 | Bugs fixed in 0.9.5: |
| 2910 | - masking operations involving negative long integers gave wrong results |
| 2911 | |
| 2912 | |
| 2913 | =================================== |
| 2914 | ==> RELEASE 0.9.4 (24 Dec 1991) <== |
| 2915 | =================================== |
| 2916 | |
| 2917 | - new function argument handling (see below) |
| 2918 | - built-in apply(func, args) means func(args[0], args[1], ...) |
| 2919 | - new, more refined exceptions |
| 2920 | - new exception string values (NameError = 'NameError' etc.) |
| 2921 | - better checking for math exceptions |
| 2922 | - for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i] |
| 2923 | - fixed list assignment bug: "a[1:1] = a" now works correctly |
| 2924 | - new class syntax, without extraneous parentheses |
| 2925 | - new 'global' statement to assign global variables from within a function |
| 2926 | |
| 2927 | |
| 2928 | New class syntax |
| 2929 | ---------------- |
| 2930 | |
| 2931 | You can now declare a base class as follows: |
| 2932 | |
| 2933 | class B: # Was: class B(): |
| 2934 | def some_method(self): ... |
| 2935 | ... |
| 2936 | |
| 2937 | and a derived class thusly: |
| 2938 | |
| 2939 | class D(B): # Was: class D() = B(): |
| 2940 | def another_method(self, arg): ... |
| 2941 | |
| 2942 | Multiple inheritance looks like this: |
| 2943 | |
| 2944 | class M(B, D): # Was: class M() = B(), D(): |
| 2945 | def this_or_that_method(self, arg): ... |
| 2946 | |
| 2947 | The old syntax is still accepted by Python 0.9.4, but will disappear |
| 2948 | in Python 1.0 (to be posted to comp.sources). |
| 2949 | |
| 2950 | |
| 2951 | New 'global' statement |
| 2952 | ---------------------- |
| 2953 | |
| 2954 | Every now and then you have a global variable in a module that you |
| 2955 | want to change from within a function in that module -- say, a count |
| 2956 | of calls to a function, or an option flag, etc. Until now this was |
| 2957 | not directly possible. While several kludges are known that |
| 2958 | circumvent the problem, and often the need for a global variable can |
| 2959 | be avoided by rewriting the module as a class, this does not always |
| 2960 | lead to clearer code. |
| 2961 | |
| 2962 | The 'global' statement solves this dilemma. Its occurrence in a |
| 2963 | function body means that, for the duration of that function, the |
| 2964 | names listed there refer to global variables. For instance: |
| 2965 | |
| 2966 | total = 0.0 |
| 2967 | count = 0 |
| 2968 | |
| 2969 | def add_to_total(amount): |
| 2970 | global total, count |
| 2971 | total = total + amount |
| 2972 | count = count + 1 |
| 2973 | |
| 2974 | 'global' must be repeated in each function where it is needed. The |
| 2975 | names listed in a 'global' statement must not be used in the function |
| 2976 | before the statement is reached. |
| 2977 | |
| 2978 | Remember that you don't need to use 'global' if you only want to *use* |
| 2979 | a global variable in a function; nor do you need ot for assignments to |
| 2980 | parts of global variables (e.g., list or dictionary items or |
| 2981 | attributes of class instances). This has not changed; in fact |
| 2982 | assignment to part of a global variable was the standard workaround. |
| 2983 | |
| 2984 | |
| 2985 | New exceptions |
| 2986 | -------------- |
| 2987 | |
| 2988 | Several new exceptions have been defined, to distinguish more clearly |
| 2989 | between different types of errors. |
| 2990 | |
| 2991 | name meaning was |
| 2992 | |
| 2993 | AttributeError reference to non-existing attribute NameError |
| 2994 | IOError unexpected I/O error RuntimeError |
| 2995 | ImportError import of non-existing module or name NameError |
| 2996 | IndexError invalid string, tuple or list index RuntimeError |
| 2997 | KeyError key not in dictionary RuntimeError |
| 2998 | OverflowError numeric overflow RuntimeError |
| 2999 | SyntaxError invalid syntax RuntimeError |
| 3000 | ValueError invalid argument value RuntimeError |
| 3001 | ZeroDivisionError division by zero RuntimeError |
| 3002 | |
| 3003 | The string value of each exception is now its name -- this makes it |
| 3004 | easier to experimentally find out which operations raise which |
| 3005 | exceptions; e.g.: |
| 3006 | |
| 3007 | >>> KeyboardInterrupt |
| 3008 | 'KeyboardInterrupt' |
| 3009 | >>> |
| 3010 | |
| 3011 | |
| 3012 | New argument passing semantics |
| 3013 | ------------------------------ |
| 3014 | |
| 3015 | Off-line discussions with Steve Majewski and Daniel LaLiberte have |
| 3016 | convinced me that Python's parameter mechanism could be changed in a |
| 3017 | way that made both of them happy (I hope), kept me happy, fixed a |
| 3018 | number of outstanding problems, and, given some backward compatibility |
| 3019 | provisions, would only break a very small amount of existing code -- |
| 3020 | probably all mine anyway. In fact I suspect that most Python users |
| 3021 | will hardly notice the difference. And yet it has cost me at least |
| 3022 | one sleepless night to decide to make the change... |
| 3023 | |
| 3024 | Philosophically, the change is quite radical (to me, anyway): a |
| 3025 | function is no longer called with either zero or one argument, which |
| 3026 | is a tuple if there appear to be more arguments. Every function now |
| 3027 | has an argument list containing 0, 1 or more arguments. This list is |
| 3028 | always implemented as a tuple, and it is a (run-time) error if a |
| 3029 | function is called with a different number of arguments than expected. |
| 3030 | |
| 3031 | What's the difference? you may ask. The answer is, very little unless |
| 3032 | you want to write variadic functions -- functions that may be called |
| 3033 | with a variable number of arguments. Formerly, you could write a |
| 3034 | function that accepted one or more arguments with little trouble, but |
| 3035 | writing a function that could be called with either 0 or 1 argument |
| 3036 | (or more) was next to impossible. This is now a piece of cake: you |
| 3037 | can simply declare an argument that receives the entire argument |
| 3038 | tuple, and check its length -- it will be of size 0 if there are no |
| 3039 | arguments. |
| 3040 | |
| 3041 | Another anomaly of the old system was the way multi-argument methods |
| 3042 | (in classes) had to be declared, e.g.: |
| 3043 | |
| 3044 | class Point(): |
| 3045 | def init(self, (x, y, color)): ... |
| 3046 | def setcolor(self, color): ... |
| 3047 | dev moveto(self, (x, y)): ... |
| 3048 | def draw(self): ... |
| 3049 | |
| 3050 | Using the new scheme there is no need to enclose the method arguments |
| 3051 | in an extra set of parentheses, so the above class could become: |
| 3052 | |
| 3053 | class Point: |
| 3054 | def init(self, x, y, color): ... |
| 3055 | def setcolor(self, color): ... |
| 3056 | dev moveto(self, x, y): ... |
| 3057 | def draw(self): ... |
| 3058 | |
| 3059 | That is, the equivalence rule between methods and functions has |
| 3060 | changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y) |
| 3061 | while formerly it was equivalent to Point.moveto(p,(x,y)). |
| 3062 | |
| 3063 | A special backward compatibility rule makes that the old version also |
| 3064 | still works: whenever a function with exactly two arguments (at the top |
| 3065 | level) is called with more than two arguments, the second and further |
| 3066 | arguments are packed into a tuple and passed as the second argument. |
| 3067 | This rule is invoked independently of whether the function is actually a |
| 3068 | method, so there is a slight chance that some erroneous calls of |
| 3069 | functions expecting two arguments with more than that number of |
| 3070 | arguments go undetected at first -- when the function tries to use the |
| 3071 | second argument it may find it is a tuple instead of what was expected. |
| 3072 | Note that this rule will be removed from future versions of the |
| 3073 | language; it is a backward compatibility provision *only*. |
| 3074 | |
| 3075 | Two other rules and a new built-in function handle conversion between |
| 3076 | tuples and argument lists: |
| 3077 | |
| 3078 | Rule (a): when a function with more than one argument is called with a |
| 3079 | single argument that is a tuple of the right size, the tuple's items |
| 3080 | are used as arguments. |
| 3081 | |
| 3082 | Rule (b): when a function with exactly one argument receives no |
| 3083 | arguments or more than one, that one argument will receive a tuple |
| 3084 | containing the arguments (the tuple will be empty if there were no |
| 3085 | arguments). |
| 3086 | |
| 3087 | |
| 3088 | A new built-in function, apply(), was added to support functions that |
| 3089 | need to call other functions with a constructed argument list. The call |
| 3090 | |
| 3091 | apply(function, tuple) |
| 3092 | |
| 3093 | is equivalent to |
| 3094 | |
| 3095 | function(tuple[0], tuple[1], ..., tuple[len(tuple)-1]) |
| 3096 | |
| 3097 | |
| 3098 | While no new argument syntax was added in this phase, it would now be |
| 3099 | quite sensible to add explicit syntax to Python for default argument |
| 3100 | values (as in C++ or Modula-3), or a "rest" argument to receive the |
| 3101 | remaining arguments of a variable-length argument list. |
| 3102 | |
| 3103 | |
| 3104 | ======================================================== |
| 3105 | ==> Release 0.9.3 (never made available outside CWI) <== |
| 3106 | ======================================================== |
| 3107 | |
| 3108 | - string sys.version shows current version (also printed on interactive entry) |
| 3109 | - more detailed exceptions, e.g., IOError, ZeroDivisionError, etc. |
| 3110 | - 'global' statement to declare module-global variables assigned in functions. |
| 3111 | - new class declaration syntax: class C(Base1, Base2, ...): suite |
| 3112 | (the old syntax is still accepted -- be sure to convert your classes now!) |
| 3113 | - C shifting and masking operators: << >> ~ & ^ | (for ints and longs). |
| 3114 | - C comparison operators: == != (the old = and <> remain valid). |
| 3115 | - floating point numbers may now start with a period (e.g., .14). |
| 3116 | - definition of integer division tightened (always truncates towards zero). |
| 3117 | - new builtins hex(x), oct(x) return hex/octal string from (long) integer. |
| 3118 | - new list method l.count(x) returns the number of occurrences of x in l. |
| 3119 | - new SGI module: al (Indigo and 4D/35 audio library). |
| 3120 | - the FORMS interface (modules fl and FL) now uses FORMS 2.0 |
| 3121 | - module gl: added lrect{read,write}, rectzoom and pixmode; |
| 3122 | added (non-GL) functions (un)packrect. |
| 3123 | - new socket method: s.allowbroadcast(flag). |
| 3124 | - many objects support __dict__, __methods__ or __members__. |
| 3125 | - dir() lists anything that has __dict__. |
| 3126 | - class attributes are no longer read-only. |
| 3127 | - classes support __bases__, instances support __class__ (and __dict__). |
| 3128 | - divmod() now also works for floats. |
| 3129 | - fixed obscure bug in eval('1 '). |
| 3130 | |
| 3131 | |
| 3132 | =================================== |
| 3133 | ==> Release 0.9.2 (Autumn 1991) <== |
| 3134 | =================================== |
| 3135 | |
| 3136 | Highlights |
| 3137 | ---------- |
| 3138 | |
| 3139 | - tutorial now (almost) complete; library reference reorganized |
| 3140 | - new syntax: continue statement; semicolons; dictionary constructors; |
| 3141 | restrictions on blank lines in source files removed |
| 3142 | - dramatically improved module load time through precompiled modules |
| 3143 | - arbitrary precision integers: compute 2 to the power 1000 and more... |
| 3144 | - arithmetic operators now accept mixed type operands, e.g., 3.14/4 |
| 3145 | - more operations on list: remove, index, reverse; repetition |
| 3146 | - improved/new file operations: readlines, seek, tell, flush, ... |
| 3147 | - process management added to the posix module: fork/exec/wait/kill etc. |
| 3148 | - BSD socket operations (with example servers and clients!) |
| 3149 | - many new STDWIN features (color, fonts, polygons, ...) |
| 3150 | - new SGI modules: font manager and FORMS library interface |
| 3151 | |
| 3152 | |
| 3153 | Extended list of changes in 0.9.2 |
| 3154 | --------------------------------- |
| 3155 | |
| 3156 | Here is a summary of the most important user-visible changes in 0.9.2, |
| 3157 | in somewhat arbitrary order. Changes in later versions are listed in |
| 3158 | the "highlights" section above. |
| 3159 | |
| 3160 | |
| 3161 | 1. Changes to the interpreter proper |
| 3162 | |
| 3163 | - Simple statements can now be separated by semicolons. |
| 3164 | If you write "if t: s1; s2", both s1 and s2 are executed |
| 3165 | conditionally. |
| 3166 | - The 'continue' statement was added, with semantics as in C. |
| 3167 | - Dictionary displays are now allowed on input: {key: value, ...}. |
| 3168 | - Blank lines and lines bearing only a comment no longer need to |
| 3169 | be indented properly. (A completely empty line still ends a multi- |
| 3170 | line statement interactively.) |
| 3171 | - Mixed arithmetic is supported, 1 compares equal to 1.0, etc. |
| 3172 | - Option "-c command" to execute statements from the command line |
| 3173 | - Compiled versions of modules are cached in ".pyc" files, giving a |
| 3174 | dramatic improvement of start-up time |
| 3175 | - Other, smaller speed improvements, e.g., extracting characters from |
| 3176 | strings, looking up single-character keys, and looking up global |
| 3177 | variables |
| 3178 | - Interrupting a print operation raises KeyboardInterrupt instead of |
| 3179 | only cancelling the print operation |
| 3180 | - Fixed various portability problems (it now passes gcc with only |
| 3181 | warnings -- more Standard C compatibility will be provided in later |
| 3182 | versions) |
| 3183 | - Source is prepared for porting to MS-DOS |
| 3184 | - Numeric constants are now checked for overflow (this requires |
| 3185 | standard-conforming strtol() and strtod() functions; a correct |
| 3186 | strtol() implementation is provided, but the strtod() provided |
| 3187 | relies on atof() for everything, including error checking |
| 3188 | |
| 3189 | |
| 3190 | 2. Changes to the built-in types, functions and modules |
| 3191 | |
| 3192 | - New module socket: interface to BSD socket primitives |
| 3193 | - New modules pwd and grp: access the UNIX password and group databases |
| 3194 | - (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager |
| 3195 | - (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library |
| 3196 | - New numeric type: long integer, for unlimited precision |
| 3197 | - integer constants suffixed with 'L' or 'l' are long integers |
| 3198 | - new built-in function long(x) converts int or float to long |
| 3199 | - int() and float() now also convert from long integers |
| 3200 | - New built-in function: |
| 3201 | - pow(x, y) returns x to the power y |
| 3202 | - New operation and methods for lists: |
| 3203 | - l*n returns a new list consisting of n concatenated copies of l |
| 3204 | - l.remove(x) removes the first occurrence of the value x from l |
| 3205 | - l.index(x) returns the index of the first occurrence of x in l |
| 3206 | - l.reverse() reverses l in place |
| 3207 | - New operation for tuples: |
| 3208 | - t*n returns a tuple consisting of n concatenated copies of t |
| 3209 | - Improved file handling: |
| 3210 | - f.readline() no longer restricts the line length, is faster, |
| 3211 | and isn't confused by null bytes; same for raw_input() |
| 3212 | - f.read() without arguments reads the entire (rest of the) file |
| 3213 | - mixing of print and sys.stdout.write() has different effect |
| 3214 | - New methods for files: |
| 3215 | - f.readlines() returns a list containing the lines of the file, |
| 3216 | as read with f.readline() |
| 3217 | - f.flush(), f.tell(), f.seek() call their stdio counterparts |
| 3218 | - f.isatty() tests for "tty-ness" |
| 3219 | - New posix functions: |
| 3220 | - _exit(), exec(), fork(), getpid(), getppid(), kill(), wait() |
| 3221 | - popen() returns a file object connected to a pipe |
| 3222 | - utime() replaces utimes() (the latter is not a POSIX name) |
| 3223 | - New stdwin features, including: |
| 3224 | - font handling |
| 3225 | - color drawing |
| 3226 | - scroll bars made optional |
| 3227 | - polygons |
| 3228 | - filled and xor shapes |
| 3229 | - text editing objects now have a 'settext' method |
| 3230 | |
| 3231 | |
| 3232 | 3. Changes to the standard library |
| 3233 | |
| 3234 | - Name change: the functions path.cat and macpath.cat are now called |
| 3235 | path.join and macpath.join |
| 3236 | - Added new modules: formatter, mutex, persist, sched, mainloop |
| 3237 | - Added some modules and functionality to the "widget set" (which is |
| 3238 | still under development, so please bear with me): |
| 3239 | DirList, FormSplit, TextEdit, WindowSched |
| 3240 | - Fixed module testall to work non-interactively |
| 3241 | - Module string: |
| 3242 | - added functions join() and joinfields() |
| 3243 | - fixed center() to work correct and make it "transitive" |
| 3244 | - Obsolete modules were removed: util, minmax |
| 3245 | - Some modules were moved to the demo directory |
| 3246 | |
| 3247 | |
| 3248 | 4. Changes to the demonstration programs |
| 3249 | |
| 3250 | - Added new useful scipts: byteyears, eptags, fact, from, lfact, |
| 3251 | objgraph, pdeps, pi, primes, ptags, which |
| 3252 | - Added a bunch of socket demos |
| 3253 | - Doubled the speed of ptags |
| 3254 | - Added new stdwin demos: microedit, miniedit |
| 3255 | - Added a windowing interface to the Python interpreter: python (most |
| 3256 | useful on the Mac) |
| 3257 | - Added a browser for Emacs info files: demo/stdwin/ibrowse |
| 3258 | (yes, I plan to put all STDWIN and Python documentation in texinfo |
| 3259 | form in the future) |
| 3260 | |
| 3261 | |
| 3262 | 5. Other changes to the distribution |
| 3263 | |
| 3264 | - An Emacs Lisp file "python.el" is provided to facilitate editing |
| 3265 | Python programs in GNU Emacs (slightly improved since posted to |
| 3266 | gnu.emacs.sources) |
| 3267 | - Some info on writing an extension in C is provided |
| 3268 | - Some info on building Python on non-UNIX platforms is provided |
| 3269 | |
| 3270 | |
| 3271 | ===================================== |
| 3272 | ==> Release 0.9.1 (February 1991) <== |
| 3273 | ===================================== |
| 3274 | |
| 3275 | - Micro changes only |
| 3276 | - Added file "patchlevel.h" |
| 3277 | |
| 3278 | |
| 3279 | ===================================== |
| 3280 | ==> Release 0.9.0 (February 1991) <== |
| 3281 | ===================================== |
| 3282 | |
| 3283 | Original posting to alt.sources. |