diff options
author | Guido van Rossum <guido@python.org> | 1994-10-06 10:29:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-10-06 10:29:26 (GMT) |
commit | 16cd7f9f122fcc8930f9da57ad5e0fe2e41ecebc (patch) | |
tree | ebab9478da642a790b8292742cf2bf703c601d14 /Doc | |
parent | d8336c2286f647b4bba34a39c18fd1ae859da92e (diff) | |
download | cpython-16cd7f9f122fcc8930f9da57ad5e0fe2e41ecebc.zip cpython-16cd7f9f122fcc8930f9da57ad5e0fe2e41ecebc.tar.gz cpython-16cd7f9f122fcc8930f9da57ad5e0fe2e41ecebc.tar.bz2 |
Moved author and date to boilerplate.tex.
Added copyright.tex to all files.
Added descr of check_interval to libsys.tex.
Corrected lotsa typos in tut.tex (thanks to George M. Sipe).
Corrected mktuple (should be newtupleobject) example in ext.tex.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/boilerplate.tex | 8 | ||||
-rw-r--r-- | Doc/copyright.tex | 22 | ||||
-rw-r--r-- | Doc/ext.tex | 13 | ||||
-rw-r--r-- | Doc/ext/ext.tex | 13 | ||||
-rw-r--r-- | Doc/lib.tex | 11 | ||||
-rw-r--r-- | Doc/lib/lib.tex | 11 | ||||
-rw-r--r-- | Doc/lib/libsys.tex | 9 | ||||
-rw-r--r-- | Doc/libsys.tex | 9 | ||||
-rw-r--r-- | Doc/ref.tex | 11 | ||||
-rw-r--r-- | Doc/ref/ref.tex | 11 | ||||
-rw-r--r-- | Doc/texinputs/boilerplate.tex | 8 | ||||
-rw-r--r-- | Doc/texinputs/copyright.tex | 22 | ||||
-rw-r--r-- | Doc/tut.tex | 37 | ||||
-rw-r--r-- | Doc/tut/tut.tex | 37 |
14 files changed, 132 insertions, 90 deletions
diff --git a/Doc/boilerplate.tex b/Doc/boilerplate.tex new file mode 100644 index 0000000..f8fc959 --- /dev/null +++ b/Doc/boilerplate.tex @@ -0,0 +1,8 @@ +\author{ + Guido van Rossum \\ + Dept. CST, CWI, P.O. Box 94079 \\ + 1090 GB Amsterdam, The Netherlands \\ + E-mail: {\tt guido@cwi.nl} +} + +\date{6 Oct 1994 \\ Release 1.1} % XXX update before release! diff --git a/Doc/copyright.tex b/Doc/copyright.tex new file mode 100644 index 0000000..f445c40 --- /dev/null +++ b/Doc/copyright.tex @@ -0,0 +1,22 @@ +Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum, +Amsterdam, The Netherlands. + +\begin{center} +All Rights Reserved +\end{center} + +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 +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. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Doc/ext.tex b/Doc/ext.tex index 48cf0d1..3dc3c45 100644 --- a/Doc/ext.tex +++ b/Doc/ext.tex @@ -2,14 +2,7 @@ \title{Extending and Embedding the Python Interpreter} -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} - -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} % Tell \index to actually write the .idx file \makeindex @@ -20,6 +13,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent @@ -427,7 +422,7 @@ arguments, you must pass an empty tuple. For example: object *result; ... /* Time to call the callback */ - arglist = mktuple(0); + arglist = newtupleobject(0); result = call_object(my_callback, arglist); DECREF(arglist); \end{verbatim} diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex index 48cf0d1..3dc3c45 100644 --- a/Doc/ext/ext.tex +++ b/Doc/ext/ext.tex @@ -2,14 +2,7 @@ \title{Extending and Embedding the Python Interpreter} -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} - -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} % Tell \index to actually write the .idx file \makeindex @@ -20,6 +13,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent @@ -427,7 +422,7 @@ arguments, you must pass an empty tuple. For example: object *result; ... /* Time to call the callback */ - arglist = mktuple(0); + arglist = newtupleobject(0); result = call_object(my_callback, arglist); DECREF(arglist); \end{verbatim} diff --git a/Doc/lib.tex b/Doc/lib.tex index 88ceffa..900cfac 100644 --- a/Doc/lib.tex +++ b/Doc/lib.tex @@ -2,14 +2,7 @@ \title{Python Library Reference} -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} - -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} \makeindex % tell \index to actually write the .idx file @@ -20,6 +13,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex index 88ceffa..900cfac 100644 --- a/Doc/lib/lib.tex +++ b/Doc/lib/lib.tex @@ -2,14 +2,7 @@ \title{Python Library Reference} -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} - -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} \makeindex % tell \index to actually write the .idx file @@ -20,6 +13,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex index cd2c646..e16fbd5 100644 --- a/Doc/lib/libsys.tex +++ b/Doc/lib/libsys.tex @@ -20,6 +20,15 @@ It is always available. modules.) \end{datadesc} +\begin{datadesc}{check_interval} +When this variable is set to an integer value, it determines how often +the interpreter checks for periodic things such as thread switches and +signal handlers. The default is 10, meaning the check is performed +every 10 Python virtual instructions. Setting this to a large value +may increase performance for programs using threads. Setting it to a +value <= 0 checks every virtual instruction, maximizing responsiveness +as well as overhead. + \begin{datadesc}{exc_type} \dataline{exc_value} \dataline{exc_traceback} diff --git a/Doc/libsys.tex b/Doc/libsys.tex index cd2c646..e16fbd5 100644 --- a/Doc/libsys.tex +++ b/Doc/libsys.tex @@ -20,6 +20,15 @@ It is always available. modules.) \end{datadesc} +\begin{datadesc}{check_interval} +When this variable is set to an integer value, it determines how often +the interpreter checks for periodic things such as thread switches and +signal handlers. The default is 10, meaning the check is performed +every 10 Python virtual instructions. Setting this to a large value +may increase performance for programs using threads. Setting it to a +value <= 0 checks every virtual instruction, maximizing responsiveness +as well as overhead. + \begin{datadesc}{exc_type} \dataline{exc_value} \dataline{exc_traceback} diff --git a/Doc/ref.tex b/Doc/ref.tex index 9fb37b6..a61c2de 100644 --- a/Doc/ref.tex +++ b/Doc/ref.tex @@ -2,14 +2,7 @@ \title{Python Reference Manual} -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} - -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} % Tell \index to actually write the .idx file \makeindex @@ -20,6 +13,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent diff --git a/Doc/ref/ref.tex b/Doc/ref/ref.tex index 9fb37b6..a61c2de 100644 --- a/Doc/ref/ref.tex +++ b/Doc/ref/ref.tex @@ -2,14 +2,7 @@ \title{Python Reference Manual} -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} - -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} % Tell \index to actually write the .idx file \makeindex @@ -20,6 +13,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent diff --git a/Doc/texinputs/boilerplate.tex b/Doc/texinputs/boilerplate.tex new file mode 100644 index 0000000..f8fc959 --- /dev/null +++ b/Doc/texinputs/boilerplate.tex @@ -0,0 +1,8 @@ +\author{ + Guido van Rossum \\ + Dept. CST, CWI, P.O. Box 94079 \\ + 1090 GB Amsterdam, The Netherlands \\ + E-mail: {\tt guido@cwi.nl} +} + +\date{6 Oct 1994 \\ Release 1.1} % XXX update before release! diff --git a/Doc/texinputs/copyright.tex b/Doc/texinputs/copyright.tex new file mode 100644 index 0000000..f445c40 --- /dev/null +++ b/Doc/texinputs/copyright.tex @@ -0,0 +1,22 @@ +Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum, +Amsterdam, The Netherlands. + +\begin{center} +All Rights Reserved +\end{center} + +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 +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. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Doc/tut.tex b/Doc/tut.tex index 55ff36f..32ebc0e 100644 --- a/Doc/tut.tex +++ b/Doc/tut.tex @@ -1,15 +1,8 @@ \documentstyle[twoside,11pt,myformat]{report} \title{Python Tutorial} - -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} \begin{document} @@ -17,6 +10,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent @@ -791,7 +786,7 @@ assignments take place. \item The {\tt while} loop executes as long as the condition (here: {\tt b < -100}) remains true. In Python, like in C, any non-zero integer value is +10}) remains true. In Python, like in C, any non-zero integer value is true; zero is false. The condition may also be a string or list value, in fact any sequence; anything with a non-zero length is true, empty sequences are false. The test used in the example is a simple @@ -813,7 +808,7 @@ line). The {\tt print} statement writes the value of the expression(s) it is given. It differs from just writing the expression you want to write (as we did earlier in the calculator examples) in the way it handles -multiple expressions and strings. Strings are written without quotes, +multiple expressions and strings. Strings are printed without quotes, and a space is inserted between items, so you can format things nicely, like this: @@ -1007,7 +1002,7 @@ arbitrary boundary: \bcode\begin{verbatim} >>> def fib(n): # write Fibonacci series up to n ... a, b = 0, 1 -... while b <= n: +... while b < n: ... print b, ... a, b = b, a+b ... @@ -1084,7 +1079,7 @@ the Fibonacci series, instead of printing it: >>> def fib2(n): # return Fibonacci series up to n ... result = [] ... a, b = 0, 1 -... while b <= n: +... while b < n: ... result.append(b) # see below ... a, b = b, a+b ... return result @@ -1359,7 +1354,7 @@ only matters for mutable objects like lists. All comparison operators have the same priority, which is lower than that of all numerical operators. -Comparisons can be chained: e.g., {\tt a < b = c} tests whether {\tt a} +Comparisons can be chained: e.g., {\tt a < b == c} tests whether {\tt a} is less than {\tt b} and moreover {\tt b} equals {\tt c}. Comparisons may be combined by the Boolean operators {\tt and} and {\tt @@ -1460,14 +1455,14 @@ with the following contents: def fib(n): # write Fibonacci series up to n a, b = 0, 1 - while b <= n: + while b < n: print b, a, b = b, a+b def fib2(n): # return Fibonacci series up to n result = [] a, b = 0, 1 - while b <= n: + while b < n: result.append(b) a, b = b, a+b return result @@ -2101,7 +2096,7 @@ may change in the future. Examples of name spaces are: the set of built-in names (functions such as \verb\abs()\, and built-in exception names); the global names in a module; and the local names in a function invocation. In a sense the set of attributes of an object -also form a name space. The important things to know about name +also form a name space. The important thing to know about name spaces is that there is absolutely no relation between names in different name spaces; for instance, two different modules may both define a function ``maximize'' without confusion --- users of the @@ -2162,7 +2157,7 @@ names, and the outermost scope (searched last) is the name space containing built-in names. Usually, the local scope references the local names of the (textually) -current function. Outside functions, the the local scope references +current function. Outside of functions, the the local scope references the same name space as the global scope: the module's name space. Class definitions place yet another name space in the local scope. @@ -2643,7 +2638,7 @@ Python is an evolving language. Since this tutorial was last thoroughly revised, several new features have been added to the language. While ideally I should revise the tutorial to incorporate them in the mainline of the text, lack of time currently requires me -to follow a more modest approach. In this chapter I will briefly list the +to take a more modest approach. In this chapter I will briefly list the most important improvements to the language and how you can use them to your benefit. @@ -2984,7 +2979,9 @@ Reference for a full description. \section{Generalized Dictionaries} The keys of dictionaries are no longer restricted to strings -- they -can be numbers, tuples, or (certain) class instances. (Lists and +can be +any immutable basic type including strings, +numbers, tuples, or (certain) class instances. (Lists and dictionaries are not acceptable as dictionary keys, in order to avoid problems when the object used as a key is modified.) @@ -3007,7 +3004,7 @@ operations are slow for large dictionaries. Examples: \section{Miscellaneous New Built-in Functions} The function \verb\vars()\ returns a dictionary containing the current -local variables. With a module as argument, it returns that module's +local variables. With a module argument, it returns that module's global variables. The old function \verb\dir(x)\ returns \verb\vars(x).keys()\. diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index 55ff36f..32ebc0e 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -1,15 +1,8 @@ \documentstyle[twoside,11pt,myformat]{report} \title{Python Tutorial} - -\author{ - Guido van Rossum \\ - Dept. CST, CWI, P.O. Box 94079 \\ - 1090 GB Amsterdam, The Netherlands \\ - E-mail: {\tt guido@cwi.nl} -} -\date{14 July 1994 \\ Release 1.0.3} % XXX update before release! +\input{boilerplate} \begin{document} @@ -17,6 +10,8 @@ \maketitle +\input{copyright} + \begin{abstract} \noindent @@ -791,7 +786,7 @@ assignments take place. \item The {\tt while} loop executes as long as the condition (here: {\tt b < -100}) remains true. In Python, like in C, any non-zero integer value is +10}) remains true. In Python, like in C, any non-zero integer value is true; zero is false. The condition may also be a string or list value, in fact any sequence; anything with a non-zero length is true, empty sequences are false. The test used in the example is a simple @@ -813,7 +808,7 @@ line). The {\tt print} statement writes the value of the expression(s) it is given. It differs from just writing the expression you want to write (as we did earlier in the calculator examples) in the way it handles -multiple expressions and strings. Strings are written without quotes, +multiple expressions and strings. Strings are printed without quotes, and a space is inserted between items, so you can format things nicely, like this: @@ -1007,7 +1002,7 @@ arbitrary boundary: \bcode\begin{verbatim} >>> def fib(n): # write Fibonacci series up to n ... a, b = 0, 1 -... while b <= n: +... while b < n: ... print b, ... a, b = b, a+b ... @@ -1084,7 +1079,7 @@ the Fibonacci series, instead of printing it: >>> def fib2(n): # return Fibonacci series up to n ... result = [] ... a, b = 0, 1 -... while b <= n: +... while b < n: ... result.append(b) # see below ... a, b = b, a+b ... return result @@ -1359,7 +1354,7 @@ only matters for mutable objects like lists. All comparison operators have the same priority, which is lower than that of all numerical operators. -Comparisons can be chained: e.g., {\tt a < b = c} tests whether {\tt a} +Comparisons can be chained: e.g., {\tt a < b == c} tests whether {\tt a} is less than {\tt b} and moreover {\tt b} equals {\tt c}. Comparisons may be combined by the Boolean operators {\tt and} and {\tt @@ -1460,14 +1455,14 @@ with the following contents: def fib(n): # write Fibonacci series up to n a, b = 0, 1 - while b <= n: + while b < n: print b, a, b = b, a+b def fib2(n): # return Fibonacci series up to n result = [] a, b = 0, 1 - while b <= n: + while b < n: result.append(b) a, b = b, a+b return result @@ -2101,7 +2096,7 @@ may change in the future. Examples of name spaces are: the set of built-in names (functions such as \verb\abs()\, and built-in exception names); the global names in a module; and the local names in a function invocation. In a sense the set of attributes of an object -also form a name space. The important things to know about name +also form a name space. The important thing to know about name spaces is that there is absolutely no relation between names in different name spaces; for instance, two different modules may both define a function ``maximize'' without confusion --- users of the @@ -2162,7 +2157,7 @@ names, and the outermost scope (searched last) is the name space containing built-in names. Usually, the local scope references the local names of the (textually) -current function. Outside functions, the the local scope references +current function. Outside of functions, the the local scope references the same name space as the global scope: the module's name space. Class definitions place yet another name space in the local scope. @@ -2643,7 +2638,7 @@ Python is an evolving language. Since this tutorial was last thoroughly revised, several new features have been added to the language. While ideally I should revise the tutorial to incorporate them in the mainline of the text, lack of time currently requires me -to follow a more modest approach. In this chapter I will briefly list the +to take a more modest approach. In this chapter I will briefly list the most important improvements to the language and how you can use them to your benefit. @@ -2984,7 +2979,9 @@ Reference for a full description. \section{Generalized Dictionaries} The keys of dictionaries are no longer restricted to strings -- they -can be numbers, tuples, or (certain) class instances. (Lists and +can be +any immutable basic type including strings, +numbers, tuples, or (certain) class instances. (Lists and dictionaries are not acceptable as dictionary keys, in order to avoid problems when the object used as a key is modified.) @@ -3007,7 +3004,7 @@ operations are slow for large dictionaries. Examples: \section{Miscellaneous New Built-in Functions} The function \verb\vars()\ returns a dictionary containing the current -local variables. With a module as argument, it returns that module's +local variables. With a module argument, it returns that module's global variables. The old function \verb\dir(x)\ returns \verb\vars(x).keys()\. |