diff options
32 files changed, 421 insertions, 205 deletions
@@ -41,7 +41,7 @@ I am the author of Python: 1098 SJ Amsterdam The Netherlands - E-mail: [email protected] + E-mail: [email protected] The Python source is copyrighted, but you can freely use and copy it as long as you don't change or remove the copyright: @@ -52,10 +52,10 @@ Netherlands. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the names of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. diff --git a/demo/sgi/gl/mclock.doc b/demo/sgi/gl/mclock.doc index 256e062..2208f33 100644 --- a/demo/sgi/gl/mclock.doc +++ b/demo/sgi/gl/mclock.doc @@ -1,7 +1,7 @@ Newsgroups: cwi.sgi Subject: Re: new clock Distribution: cwi.sgi -References: <[email protected]> +References: <[email protected]> Last week I wrote: @@ -56,5 +56,5 @@ speakers are going to be in demand!) -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam [email protected] or ..!hp4nl!cwi.nl!guido or guido%[email protected] [email protected] or ..!hp4nl!cwi.nl!guido or guido%[email protected] "A thing of beauty is a joy till sunrise" diff --git a/doc/mod.tex b/doc/mod.tex index cddfed7..f0b649a 100644 --- a/doc/mod.tex +++ b/doc/mod.tex @@ -17,7 +17,7 @@ \itembreak } - itle{\bf +\title{\bf Python Library Reference \\ (DRAFT) } @@ -26,7 +26,7 @@ Guido van Rossum \\ Dept. CST, CWI, Kruislaan 413 \\ 1098 SJ Amsterdam, The Netherlands \\ - E-mail: {\tt [email protected]} + E-mail: {\tt [email protected]} } \begin{document} @@ -49,7 +49,7 @@ gives a more formal reference to the language. \pagebreak - ableofcontents +\tableofcontents \pagebreak diff --git a/doc/mod2.tex b/doc/mod2.tex index fca5e8a..73f097c 100644 --- a/doc/mod2.tex +++ b/doc/mod2.tex @@ -1067,7 +1067,7 @@ main() This module provides access to the {\em Panel Library} built by NASA Ames (to get it, send e-mail to -{\tt [email protected]}). +{\tt [email protected]}). All access to it should be done through the standard module {\tt panel}, which transparantly exports most functions from diff --git a/doc/myformat.sty b/doc/myformat.sty index 192ddb1..7415c51 100644 --- a/doc/myformat.sty +++ b/doc/myformat.sty @@ -1,9 +1,9 @@ % Style parameters and macros used by all documents here % Page lay-out parameters - extwidth = 160mm - extheight = 240mm - opmargin = -11mm +\textwidth = 160mm +\textheight = 240mm +\topmargin = -11mm \oddsidemargin = 0mm \evensidemargin = 0mm %\parindent = 0mm diff --git a/doc/tut.tex b/doc/tut.tex index e0229b9..a17e79c 100644 --- a/doc/tut.tex +++ b/doc/tut.tex @@ -4,15 +4,15 @@ \documentstyle[11pt,myformat]{article} \title{\bf - Python Tutorial \\ - (DRAFT) + Python Tutorial \\ + (DRAFT) } \author{ Guido van Rossum \\ Dept. CST, CWI, Kruislaan 413 \\ 1098 SJ Amsterdam, The Netherlands \\ - E-mail: {\tt [email protected]} + E-mail: {\tt [email protected]} } \begin{document} @@ -361,13 +361,13 @@ For example: >>> # This is a comment >>> 2+2 4 ->>> +>>> >>> (50-5+5*6+25)/4 25 >>> # Division truncates towards zero: >>> 7/3 2 ->>> +>>> \end{verbatim}\ecode As in C, the equal sign ({\tt =}) is used to assign a value to a variable. The value of an assignment is not written: @@ -376,14 +376,14 @@ The value of an assignment is not written: >>> height = 5*9 >>> width * height 900 ->>> +>>> \end{verbatim}\ecode There is some support for floating point, but you can't mix floating point and integral numbers in expression (yet): \bcode\begin{verbatim} >>> 10.0 / 3.3 3.0303030303 ->>> +>>> \end{verbatim}\ecode Besides numbers, \Python\ can also manipulate strings, enclosed in single quotes: @@ -392,7 +392,7 @@ quotes: 'foo bar' >>> 'doesn\'t' 'doesn\'t' ->>> +>>> \end{verbatim}\ecode Strings are written inside quotes and with quotes and other funny characters escaped by backslashes, to show the precise value. @@ -406,7 +406,7 @@ operator, and repeated with~{\tt *}: 'HelpA' >>> '<' + word*5 + '>' '<HelpAHelpAHelpAHelpAHelpA>' ->>> +>>> \end{verbatim}\ecode Strings can be subscripted; as in C, the first character of a string has subscript 0. @@ -430,7 +430,7 @@ notation: two subscripts (indices) separated by a colon. >>> # A useful invariant: s[:i] + s[i:] = s >>> word[:3] + word[3:] 'HelpA' ->>> +>>> \end{verbatim}\ecode Degenerate cases are handled gracefully: an index that is too large is replaced by the string size, an upper bound smaller than the lower bound @@ -442,7 +442,7 @@ returns an empty string. '' >>> word[2:1] '' ->>> +>>> \end{verbatim}\ecode Slice indices (but not simple subscripts) may be negative numbers, to start counting from the right. @@ -455,7 +455,7 @@ For example: >>> # But -0 does not count from the right! >>> word[-0:] # (since -0 equals 0) 'HelpA' ->>> +>>> \end{verbatim}\ecode The best way to remember how slices work is to think of the indices as pointing @@ -467,10 +467,10 @@ characters has index {\tt n}, for example: \bcode\begin{verbatim} - +---+---+---+---+---+ + +---+---+---+---+---+ | H | e | l | p | A | - +---+---+---+---+---+ - 0 1 2 3 4 5 + +---+---+---+---+---+ + 0 1 2 3 4 5 -5 -4 -3 -2 -1 \end{verbatim}\ecode The first row of numbers gives the position of the indices 0...5 in the @@ -488,7 +488,7 @@ string: >>> s = 'supercalifragilisticexpialidocious' >>> len(s) 34 ->>> +>>> \end{verbatim}\ecode \Python\ knows a number of {\em compound} @@ -501,7 +501,7 @@ brackets: >>> a = ['foo', 'bar', 100, 1234] >>> a ['foo', 'bar', 100, 1234] ->>> +>>> \end{verbatim}\ecode As for strings, list subscripts start at 0: \bcode\begin{verbatim} @@ -509,7 +509,7 @@ As for strings, list subscripts start at 0: 'foo' >>> a[3] 1234 ->>> +>>> \end{verbatim}\ecode Lists can be sliced and concatenated like strings: \bcode\begin{verbatim} @@ -517,7 +517,7 @@ Lists can be sliced and concatenated like strings: ['bar', 100] >>> a[:2] + ['bletch', 2*2] ['foo', 'bar', 'bletch', 4] ->>> +>>> \end{verbatim}\ecode Unlike strings, which are {\em immutable}, @@ -545,13 +545,13 @@ of the list: >>> a[1:1] = ['bletch', 'xyzzy'] >>> a [123, 'bletch', 'xyzzy', 1234] ->>> +>>> \end{verbatim}\ecode The built-in function {\tt len()} also applies to lists: \bcode\begin{verbatim} >>> len(a) 4 ->>> +>>> \end{verbatim}\ecode \subsection{Tuples and Sequences} @@ -572,7 +572,7 @@ series as follows: >>> while b < 100: ... print b ... a, b = b, a+b -... +... 1 1 2 @@ -584,7 +584,7 @@ series as follows: 34 55 89 ->>> +>>> \end{verbatim}\ecode This example introduces several new features. \begin{itemize} @@ -645,7 +645,7 @@ items, so you can format things nicely, like this: >>> i = 256*256 >>> print 'The value of i is', i The value of i is 65536 ->>> +>>> \end{verbatim}\ecode A trailing comma avoids the newline after the output: \bcode\begin{verbatim} @@ -653,9 +653,9 @@ A trailing comma avoids the newline after the output: >>> while b < 1000: ... print b, ... a, b = b, a+b -... +... 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 ->>> +>>> \end{verbatim}\ecode Note that the interpreter inserts a newline before it prints the next prompt if the last line was not completed. @@ -681,7 +681,7 @@ For example: ... print 'Single' ... else: ... print 'More' -... +... \end{verbatim}\ecode There can be zero or more {\tt elif} parts, and the {\tt else} part is optional. @@ -704,11 +704,11 @@ For example (no pun intended): >>> a = ['cat', 'window', 'defenestrate'] >>> for x in a: ... print x, len(x) -... +... cat 3 window 6 defenestrate 12 ->>> +>>> \end{verbatim}\ecode \subsubsection{The {\tt range()} Function} @@ -720,7 +720,7 @@ e.g.: \bcode\begin{verbatim} >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] ->>> +>>> \end{verbatim}\ecode The given end point is never part of the generated list; {\tt range(10)} generates a list of 10 values, @@ -734,7 +734,7 @@ different increment (even negative): [0, 3, 6, 9] >>> range(-10, -100, -30) [-10, -40, -70] ->>> +>>> \end{verbatim}\ecode To iterate over the indices of a sequence, combine {\tt range()} and {\tt len()} as follows: @@ -742,13 +742,13 @@ and {\tt len()} as follows: >>> a = ['Mary', 'had', 'a', 'little', 'boy'] >>> for i in range(len(a)): ... print i, a[i] -... +... 0 Mary 1 had 2 a 3 little 4 boy ->>> +>>> \end{verbatim}\ecode \subsubsection{Break Statements and Else Clauses on Loops} @@ -769,7 +769,7 @@ item of value 0: ... break ... else: ... print n, 'is a prime number' -... +... 2 is a prime number 3 is a prime number 4 equals 2 * 2 @@ -778,7 +778,7 @@ item of value 0: 7 is a prime number 8 equals 2 * 4 9 equals 3 * 3 ->>> +>>> \end{verbatim}\ecode \subsubsection{Pass Statements} @@ -790,7 +790,7 @@ For example: \bcode\begin{verbatim} >>> while 1: ... pass # Busy-wait for keyboard interrupt -... +... \end{verbatim}\ecode \subsubsection{Conditions Revisited} @@ -807,11 +807,11 @@ arbitrary boundary: ... while b <= n: ... print b, ... a, b = b, a+b -... +... >>> # Now call the function we just defined: >>> fib(2000) 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 ->>> +>>> \end{verbatim}\ecode The keyword {\tt def} @@ -858,7 +858,7 @@ This serves as a general renaming mechanism: >>> f = fib >>> f(100) 1 1 2 3 5 8 13 21 34 55 89 ->>> +>>> \end{verbatim}\ecode You might object that {\tt fib} @@ -874,7 +874,7 @@ You can see it if you really want to: \bcode\begin{verbatim} >>> print fib(0) None ->>> +>>> \end{verbatim}\ecode It is simple to write a function that returns a list of the numbers of the Fibonacci series, instead of printing it: @@ -886,11 +886,11 @@ the Fibonacci series, instead of printing it: ... result.append(b) # see below ... a, b = b, a+b ... return result -... +... >>> f100 = fib2(100) # call it >>> f100 # write the result [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] ->>> +>>> \end{verbatim}\ecode This example, as usual, demonstrates some new \Python\ features: \begin{itemize} @@ -956,7 +956,7 @@ For example: >>> b.sort() >>> b ['Mary', 'a', 'boy', 'had', 'little'] ->>> +>>> \end{verbatim}\ecode \subsection{Modules} @@ -1011,7 +1011,7 @@ Now enter the \Python\ interpreter and import this module with the following command: \bcode\begin{verbatim} >>> import fibo ->>> +>>> \end{verbatim}\ecode This does not enter the names of the functions defined in {\tt fibo} @@ -1024,14 +1024,14 @@ Using the module name you can access the functions: 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 >>> fibo.fib2(100) [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] ->>> +>>> \end{verbatim}\ecode If you intend to use a function often you can assign it to a local name: \bcode\begin{verbatim} >>> fib = fibo.fib >>> fib(500) 1 1 2 3 5 8 13 21 34 55 89 144 233 377 ->>> +>>> \end{verbatim}\ecode \subsubsection{More on Modules} @@ -1074,7 +1074,7 @@ For example: >>> from fibo import fib, fib2 >>> fib(500) 1 1 2 3 5 8 13 21 34 55 89 144 233 377 ->>> +>>> \end{verbatim}\ecode This does not introduce the module name from which the imports are taken in the local symbol table (so in the example, {\tt fibo} is not @@ -1085,7 +1085,7 @@ There is even a variant to import all names that a module defines: >>> from fibo import * >>> fib(500) 1 1 2 3 5 8 13 21 34 55 89 144 233 377 ->>> +>>> \end{verbatim}\ecode This imports all names except those beginning with an underscore ({\tt \_}). @@ -1119,7 +1119,7 @@ define the strings used as primary and secondary prompts: >>> sys.ps1 = 'C> ' C> print 'Yuck!' Yuck! -C> +C> \end{verbatim}\ecode These two variables are only defined if the interpreter is in interactive mode. @@ -1137,7 +1137,7 @@ You can modify it using standard list operations, e.g.: \bcode\begin{verbatim} >>> import sys >>> sys.path.append('/ufs/guido/lib/python') ->>> +>>> \end{verbatim}\ecode \subsection{Errors and Exceptions} @@ -1159,7 +1159,7 @@ Parsing error: file <stdin>, line 1: while 1 print 'Hello world' ^ Unhandled exception: run-time error: syntax error ->>> +>>> \end{verbatim}\ecode The parser repeats the offending line and displays a little `arrow' pointing at the earliest point in the line where the error was detected. @@ -1187,7 +1187,7 @@ Stack backtrace (innermost last): Unhandled exception: type error: illegal argument type for built-in operation Stack backtrace (innermost last): File "<stdin>", line 1 ->>> +>>> \end{verbatim}\ecode Errors detected during execution are called {\em exceptions} @@ -1249,12 +1249,12 @@ some floating point numbers: ... print 1.0 / x ... except RuntimeError: ... print '*** has no inverse ***' -... +... 0.3333 3.00030003 2.5 0.4 0 *** has no inverse *** 10 0.1 ->>> +>>> \end{verbatim}\ecode The {\tt try} statement works as follows. \begin{itemize} @@ -1306,9 +1306,9 @@ argument's value, as follows: ... foo() ... except NameError, x: ... print 'name', x, 'undefined' -... +... name foo undefined ->>> +>>> \end{verbatim}\ecode If an exception has an argument, it is printed as the third part (`detail') of the message for unhandled exceptions. @@ -1345,14 +1345,14 @@ For example: \bcode\begin{verbatim} >>> def this_fails(): ... x = 1/0 -... +... >>> try: ... this_fails() ... except RuntimeError, detail: ... print 'Handling run-time error:', detail -... +... Handling run-time error: domain error or zero division ->>> +>>> \end{verbatim}\ecode \subsubsection{Raising Exceptions} @@ -1365,7 +1365,7 @@ For example: Unhandled exception: undefined name: Hi There! Stack backtrace (innermost last): File "<stdin>", line 1 ->>> +>>> \end{verbatim}\ecode The first argument to {\tt raise} names the exception to be raised. The optional second argument specifies the exception's argument. @@ -1381,13 +1381,13 @@ For example: ... raise my_exc, 2*2 ... except my_exc, val: ... print 'My exception occured, value:', val -... +... My exception occured, value: 4 >>> raise my_exc, 1 Unhandled exception: nobody likes me!: 1 Stack backtrace (innermost last): File "<stdin>", line 7 ->>> +>>> \end{verbatim}\ecode Many standard modules use this to report errors that may occur in functions they define. @@ -1402,12 +1402,12 @@ For example: ... raise KeyboardInterrupt ... finally: ... print 'Goodbye, world!' -... +... Goodbye, world! Unhandled exception: keyboard interrupt Stack backtrace (innermost last): File "<stdin>", line 2 ->>> +>>> \end{verbatim}\ecode The {\em finally\ clause} @@ -1506,18 +1506,18 @@ We can then use it in a \Python\ program as follows: >>> a.add(1) >>> a.add(1) >>> if a.is_element(3): print '3 is in the set' -... +... 3 is in the set >>> if not a.is_element(4): print '4 is not in the set' -... +... 4 is not in the set >>> print 'a has', a.size(), 'elements' a has 3 elements >>> a.remove(1) >>> print 'now a has', a.size(), 'elements' ->>> +>>> now a has 2 elements ->>> +>>> \end{verbatim}\ecode From the example we learn in the first place that the functions defined in the class (e.g., @@ -54,7 +54,7 @@ Kruislaan 413 1098 SJ Amsterdam The Netherlands .PP -E-mail: [email protected] +E-mail: [email protected] .fi .SH COPYRIGHT Copyright 1991 by Stichting Mathematisch Centrum, Amsterdam, The @@ -62,10 +62,10 @@ Netherlands. .IP " " All Rights Reserved .PP -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the names of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. diff --git a/shar/python-0.9.1-01-21.shar b/shar/python-0.9.1-01-21.shar index 7b00e8a..e3d0436 100644 --- a/shar/python-0.9.1-01-21.shar +++ b/shar/python-0.9.1-01-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 01/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:35:26 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 1952 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : Extract this part first since it makes all directories @@ -71,7 +82,7 @@ X Kruislaan 413 X 1098 SJ Amsterdam X The Netherlands X -X E-mail: [email protected] +X E-mail: [email protected] X XThe Python source is copyrighted, but you can freely use and copy it Xas long as you don't change or remove the copyright: @@ -82,10 +93,10 @@ XNetherlands. X X All Rights Reserved X -XPermission to use, copy, modify, and distribute this software and its -Xdocumentation for any purpose and without fee is hereby granted, +XPermission to use, copy, modify, and distribute this software and its +Xdocumentation for any purpose and without fee is hereby granted, Xprovided that the above copyright notice appear in all copies and that -Xboth that copyright notice and this permission notice appear in +Xboth that copyright notice and this permission notice appear in Xsupporting documentation, and that the names of Stichting Mathematisch XCentrum or CWI not be used in advertising or publicity pertaining to Xdistribution of the software without specific, written prior permission. @@ -162,7 +173,7 @@ XKruislaan 413 X1098 SJ Amsterdam XThe Netherlands X.PP -XE-mail: [email protected] +XE-mail: [email protected] X.fi X.SH COPYRIGHT XCopyright 1991 by Stichting Mathematisch Centrum, Amsterdam, The @@ -170,10 +181,10 @@ XNetherlands. X.IP " " XAll Rights Reserved X.PP -XPermission to use, copy, modify, and distribute this software and its -Xdocumentation for any purpose and without fee is hereby granted, +XPermission to use, copy, modify, and distribute this software and its +Xdocumentation for any purpose and without fee is hereby granted, Xprovided that the above copyright notice appear in all copies and that -Xboth that copyright notice and this permission notice appear in +Xboth that copyright notice and this permission notice appear in Xsupporting documentation, and that the names of Stichting Mathematisch XCentrum or CWI not be used in advertising or publicity pertaining to Xdistribution of the software without specific, written prior permission. @@ -402,15 +413,15 @@ X%\documentstyle[garamond,11pt,myformat]{article} X\documentstyle[11pt,myformat]{article} X X\title{\bf -X Python Tutorial \\ -X (DRAFT) +X Python Tutorial \\ +X (DRAFT) X} X X\author{ X Guido van Rossum \\ X Dept. CST, CWI, Kruislaan 413 \\ X 1098 SJ Amsterdam, The Netherlands \\ -X E-mail: {\tt [email protected]} +X E-mail: {\tt [email protected]} X} X X\begin{document} @@ -759,13 +770,13 @@ X\bcode\begin{verbatim} X>>> # This is a comment X>>> 2+2 X4 -X>>> +X>>> X>>> (50-5+5*6+25)/4 X25 X>>> # Division truncates towards zero: X>>> 7/3 X2 -X>>> +X>>> X\end{verbatim}\ecode XAs in C, the equal sign ({\tt =}) is used to assign a value to a variable. XThe value of an assignment is not written: @@ -774,14 +785,14 @@ X>>> width = 20 X>>> height = 5*9 X>>> width * height X900 -X>>> +X>>> X\end{verbatim}\ecode XThere is some support for floating point, but you can't mix floating Xpoint and integral numbers in expression (yet): X\bcode\begin{verbatim} X>>> 10.0 / 3.3 X3.0303030303 -X>>> +X>>> X\end{verbatim}\ecode XBesides numbers, \Python\ can also manipulate strings, enclosed in single Xquotes: @@ -790,7 +801,7 @@ X>>> 'foo bar' X'foo bar' X>>> 'doesn\'t' X'doesn\'t' -X>>> +X>>> X\end{verbatim}\ecode XStrings are written inside quotes and with quotes and other funny Xcharacters escaped by backslashes, to show the precise value. @@ -804,7 +815,7 @@ X>>> word X'HelpA' X>>> '<' + word*5 + '>' X'<HelpAHelpAHelpAHelpAHelpA>' -X>>> +X>>> X\end{verbatim}\ecode XStrings can be subscripted; as in C, the first character of a string has Xsubscript 0. @@ -828,7 +839,7 @@ X'lpA' X>>> # A useful invariant: s[:i] + s[i:] = s X>>> word[:3] + word[3:] X'HelpA' -X>>> +X>>> X\end{verbatim}\ecode XDegenerate cases are handled gracefully: an index that is too large is Xreplaced by the string size, an upper bound smaller than the lower bound @@ -840,7 +851,7 @@ X>>> word[10:] X'' X>>> word[2:1] X'' -X>>> +X>>> X\end{verbatim}\ecode XSlice indices (but not simple subscripts) may be negative numbers, to Xstart counting from the right. @@ -853,7 +864,7 @@ X'Hel' X>>> # But -0 does not count from the right! X>>> word[-0:] # (since -0 equals 0) X'HelpA' -X>>> +X>>> X\end{verbatim}\ecode XThe best way to remember how slices work is to think of the indices as Xpointing @@ -865,10 +876,10 @@ Xcharacters has index X{\tt n}, Xfor example: X\bcode\begin{verbatim} -X +---+---+---+---+---+ +X +---+---+---+---+---+ X | H | e | l | p | A | -X +---+---+---+---+---+ -X 0 1 2 3 4 5 +X +---+---+---+---+---+ +X 0 1 2 3 4 5 X-5 -4 -3 -2 -1 X\end{verbatim}\ecode XThe first row of numbers gives the position of the indices 0...5 in the @@ -886,7 +897,7 @@ X\bcode\begin{verbatim} X>>> s = 'supercalifragilisticexpialidocious' X>>> len(s) X34 -X>>> +X>>> X\end{verbatim}\ecode X\Python\ knows a number of X{\em compound} @@ -899,7 +910,7 @@ X\bcode\begin{verbatim} X>>> a = ['foo', 'bar', 100, 1234] X>>> a X['foo', 'bar', 100, 1234] -X>>> +X>>> X\end{verbatim}\ecode XAs for strings, list subscripts start at 0: X\bcode\begin{verbatim} @@ -907,7 +918,7 @@ X>>> a[0] X'foo' X>>> a[3] X1234 -X>>> +X>>> X\end{verbatim}\ecode XLists can be sliced and concatenated like strings: X\bcode\begin{verbatim} @@ -915,7 +926,7 @@ X>>> a[1:3] X['bar', 100] X>>> a[:2] + ['bletch', 2*2] X['foo', 'bar', 'bletch', 4] -X>>> +X>>> X\end{verbatim}\ecode XUnlike strings, which are X{\em immutable}, @@ -943,13 +954,13 @@ X>>> # Insert some: X>>> a[1:1] = ['bletch', 'xyzzy'] X>>> a X[123, 'bletch', 'xyzzy', 1234] -X>>> +X>>> X\end{verbatim}\ecode XThe built-in function {\tt len()} also applies to lists: X\bcode\begin{verbatim} X>>> len(a) X4 -X>>> +X>>> X\end{verbatim}\ecode X X\subsection{Tuples and Sequences} @@ -970,7 +981,7 @@ X>>> a, b = 0, 1 X>>> while b < 100: X... print b X... a, b = b, a+b -X... +X... X1 X1 X2 @@ -982,7 +993,7 @@ X21 X34 X55 X89 -X>>> +X>>> X\end{verbatim}\ecode XThis example introduces several new features. X\begin{itemize} @@ -1043,7 +1054,7 @@ X\bcode\begin{verbatim} X>>> i = 256*256 X>>> print 'The value of i is', i XThe value of i is 65536 -X>>> +X>>> X\end{verbatim}\ecode XA trailing comma avoids the newline after the output: X\bcode\begin{verbatim} @@ -1051,9 +1062,9 @@ X>>> a, b = 0, 1 X>>> while b < 1000: X... print b, X... a, b = b, a+b -X... +X... X1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 -X>>> +X>>> X\end{verbatim}\ecode XNote that the interpreter inserts a newline before it prints the next Xprompt if the last line was not completed. @@ -1079,7 +1090,7 @@ X... elif x = 1: X... print 'Single' X... else: X... print 'More' -X... +X... X\end{verbatim}\ecode XThere can be zero or more {\tt elif} parts, and the {\tt else} part is Xoptional. @@ -1102,11 +1113,11 @@ X>>> # Measure some strings: X>>> a = ['cat', 'window', 'defenestrate'] X>>> for x in a: X... print x, len(x) -X... +X... Xcat 3 Xwindow 6 Xdefenestrate 12 -X>>> +X>>> X\end{verbatim}\ecode X X\subsubsection{The {\tt range()} Function} @@ -1118,7 +1129,7 @@ Xe.g.: X\bcode\begin{verbatim} X>>> range(10) X[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] -X>>> +X>>> X\end{verbatim}\ecode XThe given end point is never part of the generated list; X{\tt range(10)} generates a list of 10 values, @@ -1132,7 +1143,7 @@ X>>> range(0, 10, 3) X[0, 3, 6, 9] X>>> range(-10, -100, -30) X[-10, -40, -70] -X>>> +X>>> X\end{verbatim}\ecode XTo iterate over the indices of a sequence, combine {\tt range()} Xand {\tt len()} as follows: @@ -1140,13 +1151,13 @@ X\bcode\begin{verbatim} X>>> a = ['Mary', 'had', 'a', 'little', 'boy'] X>>> for i in range(len(a)): X... print i, a[i] -X... +X... X0 Mary X1 had X2 a X3 little X4 boy -X>>> +X>>> X\end{verbatim}\ecode X X\subsubsection{Break Statements and Else Clauses on Loops} @@ -1167,7 +1178,7 @@ X... print n, 'equals', x, '*', n/x X... break X... else: X... print n, 'is a prime number' -X... +X... X2 is a prime number X3 is a prime number X4 equals 2 * 2 @@ -1176,7 +1187,7 @@ X6 equals 2 * 3 X7 is a prime number X8 equals 2 * 4 X9 equals 3 * 3 -X>>> +X>>> X\end{verbatim}\ecode X X\subsubsection{Pass Statements} @@ -1188,7 +1199,7 @@ XFor example: X\bcode\begin{verbatim} X>>> while 1: X... pass # Busy-wait for keyboard interrupt -X... +X... X\end{verbatim}\ecode X X\subsubsection{Conditions Revisited} @@ -1205,11 +1216,11 @@ X... a, b = 0, 1 X... while b <= n: X... print b, X... a, b = b, a+b -X... +X... X>>> # Now call the function we just defined: X>>> fib(2000) X1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 -X>>> +X>>> X\end{verbatim}\ecode XThe keyword X{\tt def} @@ -1256,7 +1267,7 @@ X<function object at 10042ed0> X>>> f = fib X>>> f(100) X1 1 2 3 5 8 13 21 34 55 89 -X>>> +X>>> X\end{verbatim}\ecode XYou might object that X{\tt fib} @@ -1272,7 +1283,7 @@ XYou can see it if you really want to: X\bcode\begin{verbatim} X>>> print fib(0) XNone -X>>> +X>>> X\end{verbatim}\ecode XIt is simple to write a function that returns a list of the numbers of Xthe Fibonacci series, instead of printing it: @@ -1284,11 +1295,11 @@ X... while b <= n: X... result.append(b) # see below X... a, b = b, a+b X... return result -X... +X... X>>> f100 = fib2(100) # call it X>>> f100 # write the result X[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] -X>>> +X>>> X\end{verbatim}\ecode XThis example, as usual, demonstrates some new \Python\ features: X\begin{itemize} @@ -1354,7 +1365,7 @@ X>>> b = ['Mary', 'had', 'a', 'little', 'boy'] X>>> b.sort() X>>> b X['Mary', 'a', 'boy', 'had', 'little'] -X>>> +X>>> X\end{verbatim}\ecode X X\subsection{Modules} @@ -1409,7 +1420,7 @@ XNow enter the \Python\ interpreter and import this module with the Xfollowing command: X\bcode\begin{verbatim} X>>> import fibo -X>>> +X>>> X\end{verbatim}\ecode XThis does not enter the names of the functions defined in X{\tt fibo} @@ -1422,14 +1433,14 @@ X>>> fibo.fib(1000) X1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 X>>> fibo.fib2(100) X[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] -X>>> +X>>> X\end{verbatim}\ecode XIf you intend to use a function often you can assign it to a local name: X\bcode\begin{verbatim} X>>> fib = fibo.fib X>>> fib(500) X1 1 2 3 5 8 13 21 34 55 89 144 233 377 -X>>> +X>>> X\end{verbatim}\ecode X X\subsubsection{More on Modules} @@ -1472,7 +1483,7 @@ X\bcode\begin{verbatim} X>>> from fibo import fib, fib2 X>>> fib(500) X1 1 2 3 5 8 13 21 34 55 89 144 233 377 -X>>> +X>>> X\end{verbatim}\ecode XThis does not introduce the module name from which the imports are taken Xin the local symbol table (so in the example, {\tt fibo} is not @@ -1483,7 +1494,7 @@ X\bcode\begin{verbatim} X>>> from fibo import * X>>> fib(500) X1 1 2 3 5 8 13 21 34 55 89 144 233 377 -X>>> +X>>> X\end{verbatim}\ecode XThis imports all names except those beginning with an underscore X({\tt \_}). @@ -1517,7 +1528,7 @@ X'... ' X>>> sys.ps1 = 'C> ' XC> print 'Yuck!' XYuck! -XC> +XC> X\end{verbatim}\ecode XThese two variables are only defined if the interpreter is in Xinteractive mode. @@ -1535,7 +1546,7 @@ XYou can modify it using standard list operations, e.g.: X\bcode\begin{verbatim} X>>> import sys X>>> sys.path.append('/ufs/guido/lib/python') -X>>> +X>>> X\end{verbatim}\ecode X X\subsection{Errors and Exceptions} @@ -1557,7 +1568,7 @@ XParsing error: file <stdin>, line 1: Xwhile 1 print 'Hello world' X ^ XUnhandled exception: run-time error: syntax error -X>>> +X>>> X\end{verbatim}\ecode XThe parser repeats the offending line and displays a little `arrow' Xpointing at the earliest point in the line where the error was detected. @@ -1585,7 +1596,7 @@ X>>> '2' + 2 XUnhandled exception: type error: illegal argument type for built-in operation XStack backtrace (innermost last): X File "<stdin>", line 1 -X>>> +X>>> X\end{verbatim}\ecode XErrors detected during execution are called X{\em exceptions} @@ -1647,12 +1658,12 @@ X... try: X... print 1.0 / x X... except RuntimeError: X... print '*** has no inverse ***' -X... +X... X0.3333 3.00030003 X2.5 0.4 X0 *** has no inverse *** X10 0.1 -X>>> +X>>> X\end{verbatim}\ecode XThe {\tt try} statement works as follows. X\begin{itemize} @@ -1704,9 +1715,9 @@ X>>> try: X... foo() X... except NameError, x: X... print 'name', x, 'undefined' -X... +X... Xname foo undefined -X>>> +X>>> X\end{verbatim}\ecode XIf an exception has an argument, it is printed as the third part X(`detail') of the message for unhandled exceptions. @@ -1743,14 +1754,14 @@ XFor example: X\bcode\begin{verbatim} X>>> def this_fails(): X... x = 1/0 -X... +X... X>>> try: X... this_fails() X... except RuntimeError, detail: X... print 'Handling run-time error:', detail -X... +X... XHandling run-time error: domain error or zero division -X>>> +X>>> X\end{verbatim}\ecode X X\subsubsection{Raising Exceptions} @@ -1763,7 +1774,7 @@ X>>> raise NameError, 'Hi There!' XUnhandled exception: undefined name: Hi There! XStack backtrace (innermost last): X File "<stdin>", line 1 -X>>> +X>>> X\end{verbatim}\ecode XThe first argument to {\tt raise} names the exception to be raised. XThe optional second argument specifies the exception's argument. @@ -1779,13 +1790,13 @@ X>>> try: X... raise my_exc, 2*2 X... except my_exc, val: X... print 'My exception occured, value:', val -X... +X... XMy exception occured, value: 4 X>>> raise my_exc, 1 XUnhandled exception: nobody likes me!: 1 XStack backtrace (innermost last): X File "<stdin>", line 7 -X>>> +X>>> X\end{verbatim}\ecode XMany standard modules use this to report errors that may occur in Xfunctions they define. @@ -1800,12 +1811,12 @@ X>>> try: X... raise KeyboardInterrupt X... finally: X... print 'Goodbye, world!' -X... +X... XGoodbye, world! XUnhandled exception: keyboard interrupt XStack backtrace (innermost last): X File "<stdin>", line 2 -X>>> +X>>> X\end{verbatim}\ecode XThe X{\em finally\ clause} @@ -1904,18 +1915,18 @@ X>>> a.add(3) X>>> a.add(1) X>>> a.add(1) X>>> if a.is_element(3): print '3 is in the set' -X... +X... X3 is in the set X>>> if not a.is_element(4): print '4 is not in the set' -X... +X... X4 is not in the set X>>> print 'a has', a.size(), 'elements' Xa has 3 elements X>>> a.remove(1) X>>> print 'now a has', a.size(), 'elements' -X>>> +X>>> Xnow a has 2 elements -X>>> +X>>> X\end{verbatim}\ecode XFrom the example we learn in the first place that the functions defined Xin the class (e.g., diff --git a/shar/python-0.9.1-03-21.shar b/shar/python-0.9.1-03-21.shar index af4bac1..bd3fbb0 100644 --- a/shar/python-0.9.1-03-21.shar +++ b/shar/python-0.9.1-03-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 03/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:21 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2944 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2941,4 +2952,4 @@ Xextern int StopPrint; /* Set when printing is interrupted */ EOF fi echo 'Part 03 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-04-21.shar b/shar/python-0.9.1-04-21.shar index b1a5d00..a4de05f 100644 --- a/shar/python-0.9.1-04-21.shar +++ b/shar/python-0.9.1-04-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 04/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:26 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2755 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2752,4 +2763,4 @@ X} EOF fi echo 'Part 04 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-05-21.shar b/shar/python-0.9.1-05-21.shar index ed014c6..4b5a952 100644 --- a/shar/python-0.9.1-05-21.shar +++ b/shar/python-0.9.1-05-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 05/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:32 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2528 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2525,4 +2536,4 @@ X#endif EOF fi echo 'Part 05 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-06-21.shar b/shar/python-0.9.1-06-21.shar index c3ec232..453cc84 100644 --- a/shar/python-0.9.1-06-21.shar +++ b/shar/python-0.9.1-06-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 06/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:38 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2509 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -1131,7 +1142,7 @@ X XThis module provides access to the X{\em Panel Library} Xbuilt by NASA Ames (to get it, send e-mail to -X{\tt [email protected]}). +X{\tt [email protected]}). XAll access to it should be done through the standard module X{\tt panel}, Xwhich transparantly exports most functions from @@ -2404,8 +2415,7 @@ X ret = xTListSeq(operand, &sc_pb); X break; X X case TListSlt: -X - ret = xTListSlt(operand, &sc_pb); +X ret = xTListSlt(operand, &sc_pb); X break; X X case LoopPut: @@ -2507,4 +2517,4 @@ X} EOF fi echo 'Part 06 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-07-21.shar b/shar/python-0.9.1-07-21.shar index 87928a4..8f4d6ad 100644 --- a/shar/python-0.9.1-07-21.shar +++ b/shar/python-0.9.1-07-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 07/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:43 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2518 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2515,4 +2526,4 @@ X*/ EOF fi echo 'Part 07 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-08-21.shar b/shar/python-0.9.1-08-21.shar index d885f95..65d2bc7 100644 --- a/shar/python-0.9.1-08-21.shar +++ b/shar/python-0.9.1-08-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 08/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:48 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2348 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -1437,8 +1448,7 @@ X free, /*tp_dealloc*/ X capprint, /*tp_print*/ X capgetattr, /*tp_getattr*/ X 0, /*tp_setattr*/ -X capcompare, /*tp_comp -are*/ +X capcompare, /*tp_compare*/ X caprepr, /*tp_repr*/ X 0, /*tp_as_number*/ X 0, /*tp_as_sequence*/ @@ -2346,4 +2356,4 @@ X#endif EOF fi echo 'Part 08 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-09-21.shar b/shar/python-0.9.1-09-21.shar index 7638cf4..402d58a 100644 --- a/shar/python-0.9.1-09-21.shar +++ b/shar/python-0.9.1-09-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 09/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:53 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2688 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2685,4 +2696,4 @@ X} EOF fi echo 'Part 09 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-10-21.shar b/shar/python-0.9.1-10-21.shar index 7a88874..dceb9a0 100644 --- a/shar/python-0.9.1-10-21.shar +++ b/shar/python-0.9.1-10-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 10/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:41:58 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2508 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -1003,8 +1014,8 @@ X******************************************************************/ X X/* Asynchronous audio module for Silicon Graphics 4D/20 under IRIX 3.3 X Copyright 1990 Stichting Mathematisch Centrum, Amsterdam -X Author: Guido van Rossum, <[email protected]> -X Last modified: [email protected], Oct 14, 1990 +X Author: Guido van Rossum, <[email protected]> +X Last modified: [email protected], Oct 14, 1990 X X Callers should #include "asa.h". X @@ -2505,4 +2516,4 @@ Xprint '}' EOF fi echo 'Part 10 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-11-21.shar b/shar/python-0.9.1-11-21.shar index 847e47f..ea82b19 100644 --- a/shar/python-0.9.1-11-21.shar +++ b/shar/python-0.9.1-11-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 11/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:05 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2618 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2615,4 +2626,4 @@ X} EOF fi echo 'Part 11 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-12-21.shar b/shar/python-0.9.1-12-21.shar index 5e995d5..011ce4d 100644 --- a/shar/python-0.9.1-12-21.shar +++ b/shar/python-0.9.1-12-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 12/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:10 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2833 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2830,4 +2841,4 @@ X} EOF fi echo 'Part 12 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-13-21.shar b/shar/python-0.9.1-13-21.shar index 9f43ada..79579b2 100644 --- a/shar/python-0.9.1-13-21.shar +++ b/shar/python-0.9.1-13-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 13/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:15 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2811 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2808,4 +2819,4 @@ X}; EOF fi echo 'Part 13 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-14-21.shar b/shar/python-0.9.1-14-21.shar index bdccfcf..6a40e94 100644 --- a/shar/python-0.9.1-14-21.shar +++ b/shar/python-0.9.1-14-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 14/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:20 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2720 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2717,4 +2728,4 @@ X}; EOF fi echo 'Part 14 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-15-21.shar b/shar/python-0.9.1-15-21.shar index a715ac5..b138533 100644 --- a/shar/python-0.9.1-15-21.shar +++ b/shar/python-0.9.1-15-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 15/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:25 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2539 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2536,4 +2547,4 @@ X} EOF fi echo 'Part 15 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-16-21.shar b/shar/python-0.9.1-16-21.shar index ea4965c..d1005b1 100644 --- a/shar/python-0.9.1-16-21.shar +++ b/shar/python-0.9.1-16-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 16/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:30 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2495 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2492,4 +2503,4 @@ X}; EOF fi echo 'Part 16 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-17-21.shar b/shar/python-0.9.1-17-21.shar index 7e27790..58f8d22 100644 --- a/shar/python-0.9.1-17-21.shar +++ b/shar/python-0.9.1-17-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 17/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:37 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2464 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -2461,4 +2472,4 @@ X} EOF fi echo 'Part 17 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-18-21.shar b/shar/python-0.9.1-18-21.shar index e78b041..b70b0d5 100644 --- a/shar/python-0.9.1-18-21.shar +++ b/shar/python-0.9.1-18-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 18/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:44 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 2268 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -159,7 +170,7 @@ sed 's/^X//' > 'demo/sgi/gl/mclock.doc' << 'EOF' XNewsgroups: cwi.sgi XSubject: Re: new clock XDistribution: cwi.sgi -XReferences: <[email protected]> +XReferences: <[email protected]> X XLast week I wrote: X @@ -214,7 +225,7 @@ Xspeakers are going to be in demand!) X X-- XGuido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam [email protected] or ..!hp4nl!cwi.nl!guido or guido%[email protected] [email protected] or ..!hp4nl!cwi.nl!guido or guido%[email protected] X"A thing of beauty is a joy till sunrise" EOF fi @@ -1575,7 +1586,7 @@ X X******************************************************************/ X X/* Two PD getcwd() implementations. -X Author: Guido van Rossum, CWI Amsterdam, Jan 1991, <[email protected]>. */ +X Author: Guido van Rossum, CWI Amsterdam, Jan 1991, <[email protected]>. */ X X/* #define NO_GETWD /* Turn this on to popen pwd instead of calling getwd() */ X @@ -2265,4 +2276,4 @@ X#define GETTUPLEITEM(op, i) ((op)->ob_item[i]) EOF fi echo 'Part 18 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-19-21.shar b/shar/python-0.9.1-19-21.shar index 8fcaf4d..623a453 100644 --- a/shar/python-0.9.1-19-21.shar +++ b/shar/python-0.9.1-19-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 19/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:49 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 1997 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -1994,4 +2005,4 @@ X}; EOF fi echo 'Part 19 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-20-21.shar b/shar/python-0.9.1-20-21.shar index e39278e..4f9fd4b 100644 --- a/shar/python-0.9.1-20-21.shar +++ b/shar/python-0.9.1-20-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jarthur!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 20/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:54 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 1941 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -1839,7 +1850,7 @@ X X******************************************************************/ X X/* PD implementation of strerror() for systems that don't have it. -X Author: Guido van Rossum, CWI Amsterdam, Oct. 1990, <[email protected]>. */ +X Author: Guido van Rossum, CWI Amsterdam, Oct. 1990, <[email protected]>. */ X X#include <stdio.h> X @@ -1938,4 +1949,4 @@ Xint tb_print PROTO((object *, FILE *)); EOF fi echo 'Part 20 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/shar/python-0.9.1-21-21.shar b/shar/python-0.9.1-21-21.shar index 4aecf13..a3b5c94 100644 --- a/shar/python-0.9.1-21-21.shar +++ b/shar/python-0.9.1-21-21.shar @@ -1,3 +1,14 @@ +Path: funic!news.funet.fi!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!charon!guido +From: [email protected] (Guido van Rossum) +Newsgroups: alt.sources +Subject: Python 0.9.1 part 21/21 +Message-ID: <[email protected]> +Date: 19 Feb 91 17:42:58 GMT +Sender: [email protected] +Organization: CWI, Amsterdam +Lines: 1675 +Originator: [email protected] + : This is a shell archive. : Extract with 'sh this_file'. : @@ -549,7 +560,7 @@ X\item[#1 = {\tt '#2'}] X\itembreak X} X -X itle{\bf +X\title{\bf X Python Library Reference \\ X (DRAFT) X} @@ -558,7 +569,7 @@ X\author{ X Guido van Rossum \\ X Dept. CST, CWI, Kruislaan 413 \\ X 1098 SJ Amsterdam, The Netherlands \\ -X E-mail: {\tt [email protected]} +X E-mail: {\tt [email protected]} X} X X\begin{document} @@ -581,7 +592,7 @@ X\end{abstract} X X\pagebreak X -X ableofcontents +X\tableofcontents X X\pagebreak X @@ -602,9 +613,9 @@ sed 's/^X//' > 'doc/myformat.sty' << 'EOF' X% Style parameters and macros used by all documents here X X% Page lay-out parameters -X extwidth = 160mm -X extheight = 240mm -X opmargin = -11mm +X\textwidth = 160mm +X\textheight = 240mm +X\topmargin = -11mm X\oddsidemargin = 0mm X\evensidemargin = 0mm X%\parindent = 0mm @@ -1672,4 +1683,4 @@ X#define NAME 2 EOF fi echo 'Part 21 out of 21 of pack.out complete.' -exit 0
\ No newline at end of file +exit 0 diff --git a/src/amoebamodule.c b/src/amoebamodule.c index 282677c..0d10744 100644 --- a/src/amoebamodule.c +++ b/src/amoebamodule.c @@ -396,8 +396,7 @@ static typeobject Captype = { capprint, /*tp_print*/ capgetattr, /*tp_getattr*/ 0, /*tp_setattr*/ - capcompare, /*tp_comp -are*/ + capcompare, /*tp_compare*/ caprepr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ @@ -24,8 +24,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Asynchronous audio module for Silicon Graphics 4D/20 under IRIX 3.3 Copyright 1990 Stichting Mathematisch Centrum, Amsterdam - Author: Guido van Rossum, <[email protected]> - Last modified: [email protected], Oct 14, 1990 + Author: Guido van Rossum, <[email protected]> + Last modified: [email protected], Oct 14, 1990 Callers should #include "asa.h". diff --git a/src/getcwd.c b/src/getcwd.c index 4bfff82..acdf117 100644 --- a/src/getcwd.c +++ b/src/getcwd.c @@ -23,7 +23,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ /* Two PD getcwd() implementations. - Author: Guido van Rossum, CWI Amsterdam, Jan 1991, <[email protected]>. */ + Author: Guido van Rossum, CWI Amsterdam, Jan 1991, <[email protected]>. */ /* #define NO_GETWD /* Turn this on to popen pwd instead of calling getwd() */ diff --git a/src/sc_interpr.c b/src/sc_interpr.c index 6fec0e8..b2503bd 100644 --- a/src/sc_interpr.c +++ b/src/sc_interpr.c @@ -1250,8 +1250,7 @@ struct sc_ProcessBlock sc_pb; break; case TListSlt: - - ret = xTListSlt(operand, &sc_pb); + ret = xTListSlt(operand, &sc_pb); break; case LoopPut: diff --git a/src/strerror.c b/src/strerror.c index 202725f..37f9964 100644 --- a/src/strerror.c +++ b/src/strerror.c @@ -23,7 +23,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ /* PD implementation of strerror() for systems that don't have it. - Author: Guido van Rossum, CWI Amsterdam, Oct. 1990, <[email protected]>. */ + Author: Guido van Rossum, CWI Amsterdam, Oct. 1990, <[email protected]>. */ #include <stdio.h> |
