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

Skip to content

Commit cfb45e4

Browse files
committed
typos
1 parent 9351fdb commit cfb45e4

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

Doc/tut.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ \section{Break and Continue Statements, and Else Clauses on Loops}
959959
loop terminates through exhaustion of the list (with {\tt for}) or when
960960
the condition becomes false (with {\tt while}), but not when the loop is
961961
terminated by a {\tt break} statement. This is exemplified by the
962-
following loop, which searches for a list item of value 0:
962+
following loop, which searches for prime numbers:
963963

964964
\bcode\begin{verbatim}
965965
>>> for n in range(2, 10):
@@ -1024,7 +1024,7 @@ \section{Defining Functions}
10241024
variable references first look in the local symbol table, then
10251025
in the global symbol table, and then in the table of built-in names.
10261026
Thus,
1027-
global variables cannot be directly assigned to from within a
1027+
global variables cannot be directly assigned a value within a
10281028
function (unless named in a {\tt global} statement), although
10291029
they may be referenced.
10301030

@@ -3035,7 +3035,7 @@ \section{Else Clause For Try Statement}
30353035

30363036
\section{New Class Features in Release 1.1}
30373037

3038-
Semoe changes have been made to classes: the operator overloading
3038+
Some changes have been made to classes: the operator overloading
30393039
mechanism is more flexible, providing more support for non-numeric use
30403040
of operators (including calling an object as if it were a function),
30413041
and it is possible to trap attribute accesses.
@@ -3119,7 +3119,7 @@ \subsection{Trapping Attribute Access}
31193119
def __getattr__(self, name):
31203120
return getattr(self.wrapped, name)
31213121
def __setattr__(self, name, value):
3122-
setattr(self.wrapped, value)
3122+
setattr(self.wrapped, name, value)
31233123
def __delattr__(self, name):
31243124
delattr(self.wrapped, name)
31253125

Doc/tut/tut.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ \section{Break and Continue Statements, and Else Clauses on Loops}
959959
loop terminates through exhaustion of the list (with {\tt for}) or when
960960
the condition becomes false (with {\tt while}), but not when the loop is
961961
terminated by a {\tt break} statement. This is exemplified by the
962-
following loop, which searches for a list item of value 0:
962+
following loop, which searches for prime numbers:
963963

964964
\bcode\begin{verbatim}
965965
>>> for n in range(2, 10):
@@ -1024,7 +1024,7 @@ \section{Defining Functions}
10241024
variable references first look in the local symbol table, then
10251025
in the global symbol table, and then in the table of built-in names.
10261026
Thus,
1027-
global variables cannot be directly assigned to from within a
1027+
global variables cannot be directly assigned a value within a
10281028
function (unless named in a {\tt global} statement), although
10291029
they may be referenced.
10301030

@@ -3035,7 +3035,7 @@ \section{Else Clause For Try Statement}
30353035

30363036
\section{New Class Features in Release 1.1}
30373037

3038-
Semoe changes have been made to classes: the operator overloading
3038+
Some changes have been made to classes: the operator overloading
30393039
mechanism is more flexible, providing more support for non-numeric use
30403040
of operators (including calling an object as if it were a function),
30413041
and it is possible to trap attribute accesses.
@@ -3119,7 +3119,7 @@ \subsection{Trapping Attribute Access}
31193119
def __getattr__(self, name):
31203120
return getattr(self.wrapped, name)
31213121
def __setattr__(self, name, value):
3122-
setattr(self.wrapped, value)
3122+
setattr(self.wrapped, name, value)
31233123
def __delattr__(self, name):
31243124
delattr(self.wrapped, name)
31253125

0 commit comments

Comments
 (0)