Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a02469f

Browse files
committed
More message updates and minor fixes.
1 parent a2f84ce commit a02469f

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

Doc/tut/tut.tex

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ \subsection{Keyword Arguments \label{keywordArgs}}
14671467
>>> function(0, a=0)
14681468
Traceback (most recent call last):
14691469
File "<stdin>", line 1, in ?
1470-
TypeError: keyword parameter redefined
1470+
TypeError: function() got multiple values for keyword argument 'a'
14711471
\end{verbatim}
14721472

14731473
When a final formal parameter of the form \code{**\var{name}} is
@@ -1875,9 +1875,8 @@ \subsection{List Comprehensions}
18751875
>>> x = 100 # this gets overwritten
18761876
>>> [x**3 for x in range(5)]
18771877
[0, 1, 8, 27, 64]
1878-
>>> x
1879-
4 # the final value for range(5)
1880-
>>
1878+
>>> x # the final value for range(5)
1879+
4
18811880
\end{verbatim}
18821881

18831882

@@ -1889,8 +1888,7 @@ \section{The \keyword{del} statement \label{del}}
18891888
empty list to the slice). For example:
18901889

18911890
\begin{verbatim}
1892-
>>> a
1893-
[-1, 1, 66.6, 333, 333, 1234.5]
1891+
>>> a = [-1, 1, 66.6, 333, 333, 1234.5]
18941892
>>> del a[0]
18951893
>>> a
18961894
[1, 66.6, 333, 333, 1234.5]
@@ -2036,7 +2034,7 @@ \section{Dictionaries \label{dictionaries}}
20362034
>>> tel.keys()
20372035
['guido', 'irv', 'jack']
20382036
>>> tel.has_key('guido')
2039-
1
2037+
True
20402038
\end{verbatim}
20412039

20422040
The \function{dict()} contructor builds dictionaries directly from
@@ -2428,7 +2426,8 @@ \section{Standard Modules \label{standardModules}}
24282426
>>> sys.ps1 = 'C> '
24292427
C> print 'Yuck!'
24302428
Yuck!
2431-
C>
2429+
C>
2430+
24322431
\end{verbatim}
24332432

24342433
These two variables are only defined if the interpreter is in
@@ -3135,15 +3134,15 @@ \section{Exceptions \label{exceptions}}
31353134
>>> 10 * (1/0)
31363135
Traceback (most recent call last):
31373136
File "<stdin>", line 1, in ?
3138-
ZeroDivisionError: integer division or modulo
3137+
ZeroDivisionError: integer division or modulo by zero
31393138
>>> 4 + spam*3
31403139
Traceback (most recent call last):
31413140
File "<stdin>", line 1, in ?
31423141
NameError: name 'spam' is not defined
31433142
>>> '2' + 2
31443143
Traceback (most recent call last):
31453144
File "<stdin>", line 1, in ?
3146-
TypeError: illegal argument type for built-in operation
3145+
TypeError: cannot concatenate 'str' and 'int' objects
31473146
\end{verbatim}
31483147
31493148
The last line of the error message indicates what happened.

0 commit comments

Comments
 (0)