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

Skip to content

Commit a030c76

Browse files
committed
Many minor markup adjustments for consistency.
1 parent 4d707a5 commit a030c76

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Doc/whatsnew/whatsnew22.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ \section{PEP 234: Iterators}
521521
create and return a new iterator for the object; if the object is its
522522
own iterator, this method can just return \code{self}. In particular,
523523
iterators will usually be their own iterators. Extension types
524-
implemented in C can implement a \code{tp_iter} function in order to
524+
implemented in C can implement a \member{tp_iter} function in order to
525525
return an iterator, and extension types that want to behave as
526-
iterators can define a \code{tp_iternext} function.
526+
iterators can define a \member{tp_iternext} function.
527527

528528
So, after all this, what do iterators actually do? They have one
529529
required method, \method{next()}, which takes no arguments and returns
@@ -552,7 +552,7 @@ \section{PEP 234: Iterators}
552552
it expects something for which \function{iter()} will return an iterator.
553553
For backward compatibility and convenience, an iterator is
554554
automatically constructed for sequences that don't implement
555-
\method{__iter__()} or a \code{tp_iter} slot, so \code{for i in
555+
\method{__iter__()} or a \member{tp_iter} slot, so \code{for i in
556556
[1,2,3]} will still work. Wherever the Python interpreter loops over
557557
a sequence, it's been changed to use the iterator protocol. This
558558
means you can do things like this:
@@ -659,11 +659,11 @@ \section{PEP 255: Simple Generators}
659659
statement. The big difference between \keyword{yield} and a
660660
\keyword{return} statement is that on reaching a \keyword{yield} the
661661
generator's state of execution is suspended and local variables are
662-
preserved. On the next call to the generator's \code{.next()} method,
662+
preserved. On the next call to the generator's \code{next()} method,
663663
the function will resume executing immediately after the
664664
\keyword{yield} statement. (For complicated reasons, the
665665
\keyword{yield} statement isn't allowed inside the \keyword{try} block
666-
of a \code{try...finally} statement; read \pep{255} for a full
666+
of a \keyword{try}...\keyword{finally} statement; read \pep{255} for a full
667667
explanation of the interaction between \keyword{yield} and
668668
exceptions.)
669669

@@ -863,7 +863,7 @@ \section{PEP 238: Changing the Division Operator}
863863

864864
\item Classes can define methods called \method{__truediv__} and
865865
\method{__floordiv__} to overload the two division operators. At the
866-
C level, there are also slots in the \code{PyNumberMethods} structure
866+
C level, there are also slots in the \ctype{PyNumberMethods} structure
867867
so extension types can define the two operators.
868868

869869
\item Python 2.2 supports some command-line arguments for testing
@@ -1131,7 +1131,7 @@ \section{New and Improved Modules}
11311131
function \function{help()} that uses the \module{pydoc} module
11321132
introduced in Python 2.1 to provide interactive help.
11331133
\code{help(\var{object})} displays any available help text about
1134-
\var{object}. \code{help()} with no argument puts you in an online
1134+
\var{object}. \function{help()} with no argument puts you in an online
11351135
help utility, where you can enter the names of functions, classes,
11361136
or modules to read their help text.
11371137
(Contributed by Guido van Rossum, using Ka-Ping Yee's \module{pydoc} module.)
@@ -1243,7 +1243,7 @@ \section{Interpreter Changes and Fixes}
12431243
\cfunction{PyArg_UnpackTuple()}, has been added that's simpler and
12441244
presumably faster. Instead of specifying a format string, the
12451245
caller simply gives the minimum and maximum number of arguments
1246-
expected, and a set of pointers to \code{PyObject*} variables that
1246+
expected, and a set of pointers to \ctype{PyObject*} variables that
12471247
will be filled in with argument values.
12481248

12491249
\item Two new flags \constant{METH_NOARGS} and \constant{METH_O} are
@@ -1358,10 +1358,10 @@ \section{Other Changes and Fixes}
13581358
now convert it to an MBCS encoded string, as used by the Microsoft
13591359
file APIs. As MBCS is explicitly used by the file APIs, Python's
13601360
choice of ASCII as the default encoding turns out to be an
1361-
annoyance. On Unix, the locale's character set is used if
1361+
annoyance. On \UNIX, the locale's character set is used if
13621362
\function{locale.nl_langinfo(CODESET)} is available. (Windows
13631363
support was contributed by Mark Hammond with assistance from
1364-
Marc-Andr\'e Lemburg. Unix support was added by Martin von L\"owis.)
1364+
Marc-Andr\'e Lemburg. \UNIX{} support was added by Martin von L\"owis.)
13651365

13661366
\item Large file support is now enabled on Windows. (Contributed by
13671367
Tim Peters.)

0 commit comments

Comments
 (0)