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

Skip to content

Commit 9d20ac3

Browse files
committed
Removed various "(New in 1.5a?!)" constructs. Other notes pertaining to
versioning remain intact.
1 parent 70d289d commit 9d20ac3

2 files changed

Lines changed: 6 additions & 44 deletions

File tree

Doc/api.tex

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -661,14 +661,12 @@ \chapter{Exception Handling}
661661
\end{cfuncdesc}
662662

663663
\begin{cfuncdesc}{int}{PyErr_ExceptionMatches}{PyObject *exc}
664-
\strong{(NEW in 1.5a4!)}
665664
Equivalent to
666665
\samp{PyErr_GivenExceptionMatches(PyErr_Occurred(), \var{exc})}.
667666
This should only be called when an exception is actually set.
668667
\end{cfuncdesc}
669668

670669
\begin{cfuncdesc}{int}{PyErr_GivenExceptionMatches}{PyObject *given, PyObject *exc}
671-
\strong{(NEW in 1.5a4!)}
672670
Return true if the \var{given} exception matches the exception in
673671
\var{exc}. If \var{exc} is a class object, this also returns true
674672
when \var{given} is a subclass. If \var{exc} is a tuple, all
@@ -678,7 +676,6 @@ \chapter{Exception Handling}
678676
\end{cfuncdesc}
679677

680678
\begin{cfuncdesc}{void}{PyErr_NormalizeException}{PyObject**exc, PyObject**val, PyObject**tb}
681-
\strong{(NEW in 1.5a4!)}
682679
Under certain circumstances, the values returned by
683680
\cfunction{PyErr_Fetch()} below can be ``unnormalized'', meaning that
684681
\code{*\var{exc}} is a class object but \code{*\var{val}} is not an
@@ -792,7 +789,6 @@ \chapter{Exception Handling}
792789

793790
\begin{cfuncdesc}{PyObject *}{PyErr_NewException}{char *name,
794791
PyObject *base, PyObject *dict}
795-
\strong{(NEW in 1.5a4!)}
796792
This utility function creates and returns a new exception object. The
797793
\var{name} argument must be the name of the new exception, a \C{} string
798794
of the form \code{module.class}. The \var{base} and \var{dict}
@@ -819,7 +815,7 @@ \section{Standard Exceptions}
819815
These have the type \code{PyObject *}; they are all either class
820816
objects or string objects, depending on the use of the \code{-X}
821817
option to the interpreter. For completeness, here are all the
822-
variables (the first four are new in Python 1.5a4):
818+
variables:
823819
\code{PyExc_Exception},
824820
\code{PyExc_StandardError},
825821
\code{PyExc_ArithmeticError},
@@ -918,7 +914,6 @@ \section{Importing Modules}
918914
\end{cfuncdesc}
919915
920916
\begin{cfuncdesc}{PyObject *}{PyImport_ImportModuleEx}{char *name, PyObject *globals, PyObject *locals, PyObject *fromlist}
921-
\strong{(NEW in 1.5a4!)}
922917
Import a module. This is best described by referring to the built-in
923918
Python function \function{__import__()}\bifuncindex{__import__}, as
924919
the standard \function{__import__()} function calls this function
@@ -2241,15 +2236,13 @@ \chapter{Initialization, Finalization, and Threads}
22412236
\end{cfuncdesc}
22422237
22432238
\begin{cfuncdesc}{int}{Py_IsInitialized}{}
2244-
\strong{(NEW in 1.5a4!)}
22452239
Return true (nonzero) when the Python interpreter has been
22462240
initialized, false (zero) if not. After \cfunction{Py_Finalize()} is
22472241
called, this returns false until \cfunction{Py_Initialize()} is called
22482242
again.
22492243
\end{cfuncdesc}
22502244
22512245
\begin{cfuncdesc}{void}{Py_Finalize}{}
2252-
\strong{(NEW in 1.5a3!)}
22532246
Undo all initializations made by \cfunction{Py_Initialize()} and
22542247
subsequent use of Python/C API functions, and destroy all
22552248
sub-interpreters (see \cfunction{Py_NewInterpreter()} below) that were
@@ -2282,7 +2275,6 @@ \chapter{Initialization, Finalization, and Threads}
22822275
\end{cfuncdesc}
22832276
22842277
\begin{cfuncdesc}{PyThreadState *}{Py_NewInterpreter}{}
2285-
\strong{(NEW in 1.5a3!)}
22862278
Create a new sub-interpreter. This is an (almost) totally separate
22872279
environment for the execution of Python code. In particular, the new
22882280
interpreter has separate, independent versions of all imported
@@ -2337,7 +2329,6 @@ \chapter{Initialization, Finalization, and Threads}
23372329
\end{cfuncdesc}
23382330
23392331
\begin{cfuncdesc}{void}{Py_EndInterpreter}{PyThreadState *tstate}
2340-
\strong{(NEW in 1.5a3!)}
23412332
Destroy the (sub-)interpreter represented by the given thread state.
23422333
The given thread state must be the current thread state. See the
23432334
discussion of thread states below. When the call returns, the current
@@ -2349,7 +2340,6 @@ \chapter{Initialization, Finalization, and Threads}
23492340
\end{cfuncdesc}
23502341
23512342
\begin{cfuncdesc}{void}{Py_SetProgramName}{char *name}
2352-
\strong{(NEW in 1.5a3!)}
23532343
This function should be called before \cfunction{Py_Initialize()} is called
23542344
for the first time, if it is called at all. It tells the interpreter
23552345
the value of the \code{argv[0]} argument to the \cfunction{main()} function
@@ -2421,7 +2411,6 @@ \chapter{Initialization, Finalization, and Threads}
24212411
\end{cfuncdesc}
24222412
24232413
\begin{cfuncdesc}{char *}{Py_GetProgramFullPath}{}
2424-
\strong{(NEW in 1.5a3!)}
24252414
Return the full program name of the Python executable; this is
24262415
computed as a side-effect of deriving the default module search path
24272416
from the program name (set by \cfunction{Py_SetProgramName()} above). The
@@ -2545,7 +2534,7 @@ \section{Thread State and the Global Interpreter Lock}
25452534
25462535
There's one global variable left, however: the pointer to the current
25472536
\code{PyThreadState} structure. While most thread packages have a way
2548-
to store ``per-thread global data'', Python's internal platform
2537+
to store ``per-thread global data,'' Python's internal platform
25492538
independent thread abstraction doesn't support this yet. Therefore,
25502539
the current thread state must be manipulated explicitly.
25512540
@@ -2644,7 +2633,6 @@ \section{Thread State and the Global Interpreter Lock}
26442633
XXX More?
26452634
26462635
\begin{ctypedesc}{PyInterpreterState}
2647-
\strong{(NEW in 1.5a3!)}
26482636
This data structure represents the state shared by a number of
26492637
cooperating threads. Threads belonging to the same interpreter
26502638
share their module administration and a few other internal items.
@@ -2657,7 +2645,6 @@ \section{Thread State and the Global Interpreter Lock}
26572645
\end{ctypedesc}
26582646
26592647
\begin{ctypedesc}{PyThreadState}
2660-
\strong{(NEW in 1.5a3!)}
26612648
This data structure represents the state of a single thread. The only
26622649
public data member is \code{PyInterpreterState *interp}, which points
26632650
to this thread's interpreter state.
@@ -2696,22 +2683,19 @@ \section{Thread State and the Global Interpreter Lock}
26962683
\end{cfuncdesc}
26972684
26982685
\begin{cfuncdesc}{void}{PyEval_AcquireLock}{}
2699-
\strong{(NEW in 1.5a3!)}
27002686
Acquire the global interpreter lock. The lock must have been created
27012687
earlier. If this thread already has the lock, a deadlock ensues.
27022688
This function is not available when thread support is disabled at
27032689
compile time.
27042690
\end{cfuncdesc}
27052691
27062692
\begin{cfuncdesc}{void}{PyEval_ReleaseLock}{}
2707-
\strong{(NEW in 1.5a3!)}
27082693
Release the global interpreter lock. The lock must have been created
27092694
earlier. This function is not available when thread support is
27102695
disabled at compile time.
27112696
\end{cfuncdesc}
27122697
27132698
\begin{cfuncdesc}{void}{PyEval_AcquireThread}{PyThreadState *tstate}
2714-
\strong{(NEW in 1.5a3!)}
27152699
Acquire the global interpreter lock and then set the current thread
27162700
state to \var{tstate}, which should not be \NULL{}. The lock must
27172701
have been created earlier. If this thread already has the lock,
@@ -2720,7 +2704,6 @@ \section{Thread State and the Global Interpreter Lock}
27202704
\end{cfuncdesc}
27212705
27222706
\begin{cfuncdesc}{void}{PyEval_ReleaseThread}{PyThreadState *tstate}
2723-
\strong{(NEW in 1.5a3!)}
27242707
Reset the current thread state to \NULL{} and release the global
27252708
interpreter lock. The lock must have been created earlier and must be
27262709
held by the current thread. The \var{tstate} argument, which must not
@@ -2731,7 +2714,6 @@ \section{Thread State and the Global Interpreter Lock}
27312714
\end{cfuncdesc}
27322715
27332716
\begin{cfuncdesc}{PyThreadState *}{PyEval_SaveThread}{}
2734-
\strong{(Different return type in 1.5a3!)}
27352717
Release the interpreter lock (if it has been created and thread
27362718
support is enabled) and reset the thread state to \NULL{},
27372719
returning the previous thread state (which is not \NULL{}). If
@@ -2741,7 +2723,6 @@ \section{Thread State and the Global Interpreter Lock}
27412723
\end{cfuncdesc}
27422724
27432725
\begin{cfuncdesc}{void}{PyEval_RestoreThread}{PyThreadState *tstate}
2744-
\strong{(Different argument type in 1.5a3!)}
27452726
Acquire the interpreter lock (if it has been created and thread
27462727
support is enabled) and set the thread state to \var{tstate}, which
27472728
must not be \NULL{}. If the lock has been created, the current
@@ -2785,7 +2766,7 @@ \section{Thread State and the Global Interpreter Lock}
27852766
27862767
All of the following functions are only available when thread support
27872768
is enabled at compile time, and must be called only when the
2788-
interpreter lock has been created. They are all new in 1.5a3.
2769+
interpreter lock has been created.
27892770
27902771
\begin{cfuncdesc}{PyInterpreterState *}{PyInterpreterState_New}{}
27912772
Create a new interpreter state object. The interpreter lock must be

Doc/api/api.tex

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -661,14 +661,12 @@ \chapter{Exception Handling}
661661
\end{cfuncdesc}
662662

663663
\begin{cfuncdesc}{int}{PyErr_ExceptionMatches}{PyObject *exc}
664-
\strong{(NEW in 1.5a4!)}
665664
Equivalent to
666665
\samp{PyErr_GivenExceptionMatches(PyErr_Occurred(), \var{exc})}.
667666
This should only be called when an exception is actually set.
668667
\end{cfuncdesc}
669668

670669
\begin{cfuncdesc}{int}{PyErr_GivenExceptionMatches}{PyObject *given, PyObject *exc}
671-
\strong{(NEW in 1.5a4!)}
672670
Return true if the \var{given} exception matches the exception in
673671
\var{exc}. If \var{exc} is a class object, this also returns true
674672
when \var{given} is a subclass. If \var{exc} is a tuple, all
@@ -678,7 +676,6 @@ \chapter{Exception Handling}
678676
\end{cfuncdesc}
679677

680678
\begin{cfuncdesc}{void}{PyErr_NormalizeException}{PyObject**exc, PyObject**val, PyObject**tb}
681-
\strong{(NEW in 1.5a4!)}
682679
Under certain circumstances, the values returned by
683680
\cfunction{PyErr_Fetch()} below can be ``unnormalized'', meaning that
684681
\code{*\var{exc}} is a class object but \code{*\var{val}} is not an
@@ -792,7 +789,6 @@ \chapter{Exception Handling}
792789

793790
\begin{cfuncdesc}{PyObject *}{PyErr_NewException}{char *name,
794791
PyObject *base, PyObject *dict}
795-
\strong{(NEW in 1.5a4!)}
796792
This utility function creates and returns a new exception object. The
797793
\var{name} argument must be the name of the new exception, a \C{} string
798794
of the form \code{module.class}. The \var{base} and \var{dict}
@@ -819,7 +815,7 @@ \section{Standard Exceptions}
819815
These have the type \code{PyObject *}; they are all either class
820816
objects or string objects, depending on the use of the \code{-X}
821817
option to the interpreter. For completeness, here are all the
822-
variables (the first four are new in Python 1.5a4):
818+
variables:
823819
\code{PyExc_Exception},
824820
\code{PyExc_StandardError},
825821
\code{PyExc_ArithmeticError},
@@ -918,7 +914,6 @@ \section{Importing Modules}
918914
\end{cfuncdesc}
919915
920916
\begin{cfuncdesc}{PyObject *}{PyImport_ImportModuleEx}{char *name, PyObject *globals, PyObject *locals, PyObject *fromlist}
921-
\strong{(NEW in 1.5a4!)}
922917
Import a module. This is best described by referring to the built-in
923918
Python function \function{__import__()}\bifuncindex{__import__}, as
924919
the standard \function{__import__()} function calls this function
@@ -2241,15 +2236,13 @@ \chapter{Initialization, Finalization, and Threads}
22412236
\end{cfuncdesc}
22422237
22432238
\begin{cfuncdesc}{int}{Py_IsInitialized}{}
2244-
\strong{(NEW in 1.5a4!)}
22452239
Return true (nonzero) when the Python interpreter has been
22462240
initialized, false (zero) if not. After \cfunction{Py_Finalize()} is
22472241
called, this returns false until \cfunction{Py_Initialize()} is called
22482242
again.
22492243
\end{cfuncdesc}
22502244
22512245
\begin{cfuncdesc}{void}{Py_Finalize}{}
2252-
\strong{(NEW in 1.5a3!)}
22532246
Undo all initializations made by \cfunction{Py_Initialize()} and
22542247
subsequent use of Python/C API functions, and destroy all
22552248
sub-interpreters (see \cfunction{Py_NewInterpreter()} below) that were
@@ -2282,7 +2275,6 @@ \chapter{Initialization, Finalization, and Threads}
22822275
\end{cfuncdesc}
22832276
22842277
\begin{cfuncdesc}{PyThreadState *}{Py_NewInterpreter}{}
2285-
\strong{(NEW in 1.5a3!)}
22862278
Create a new sub-interpreter. This is an (almost) totally separate
22872279
environment for the execution of Python code. In particular, the new
22882280
interpreter has separate, independent versions of all imported
@@ -2337,7 +2329,6 @@ \chapter{Initialization, Finalization, and Threads}
23372329
\end{cfuncdesc}
23382330
23392331
\begin{cfuncdesc}{void}{Py_EndInterpreter}{PyThreadState *tstate}
2340-
\strong{(NEW in 1.5a3!)}
23412332
Destroy the (sub-)interpreter represented by the given thread state.
23422333
The given thread state must be the current thread state. See the
23432334
discussion of thread states below. When the call returns, the current
@@ -2349,7 +2340,6 @@ \chapter{Initialization, Finalization, and Threads}
23492340
\end{cfuncdesc}
23502341
23512342
\begin{cfuncdesc}{void}{Py_SetProgramName}{char *name}
2352-
\strong{(NEW in 1.5a3!)}
23532343
This function should be called before \cfunction{Py_Initialize()} is called
23542344
for the first time, if it is called at all. It tells the interpreter
23552345
the value of the \code{argv[0]} argument to the \cfunction{main()} function
@@ -2421,7 +2411,6 @@ \chapter{Initialization, Finalization, and Threads}
24212411
\end{cfuncdesc}
24222412
24232413
\begin{cfuncdesc}{char *}{Py_GetProgramFullPath}{}
2424-
\strong{(NEW in 1.5a3!)}
24252414
Return the full program name of the Python executable; this is
24262415
computed as a side-effect of deriving the default module search path
24272416
from the program name (set by \cfunction{Py_SetProgramName()} above). The
@@ -2545,7 +2534,7 @@ \section{Thread State and the Global Interpreter Lock}
25452534
25462535
There's one global variable left, however: the pointer to the current
25472536
\code{PyThreadState} structure. While most thread packages have a way
2548-
to store ``per-thread global data'', Python's internal platform
2537+
to store ``per-thread global data,'' Python's internal platform
25492538
independent thread abstraction doesn't support this yet. Therefore,
25502539
the current thread state must be manipulated explicitly.
25512540
@@ -2644,7 +2633,6 @@ \section{Thread State and the Global Interpreter Lock}
26442633
XXX More?
26452634
26462635
\begin{ctypedesc}{PyInterpreterState}
2647-
\strong{(NEW in 1.5a3!)}
26482636
This data structure represents the state shared by a number of
26492637
cooperating threads. Threads belonging to the same interpreter
26502638
share their module administration and a few other internal items.
@@ -2657,7 +2645,6 @@ \section{Thread State and the Global Interpreter Lock}
26572645
\end{ctypedesc}
26582646
26592647
\begin{ctypedesc}{PyThreadState}
2660-
\strong{(NEW in 1.5a3!)}
26612648
This data structure represents the state of a single thread. The only
26622649
public data member is \code{PyInterpreterState *interp}, which points
26632650
to this thread's interpreter state.
@@ -2696,22 +2683,19 @@ \section{Thread State and the Global Interpreter Lock}
26962683
\end{cfuncdesc}
26972684
26982685
\begin{cfuncdesc}{void}{PyEval_AcquireLock}{}
2699-
\strong{(NEW in 1.5a3!)}
27002686
Acquire the global interpreter lock. The lock must have been created
27012687
earlier. If this thread already has the lock, a deadlock ensues.
27022688
This function is not available when thread support is disabled at
27032689
compile time.
27042690
\end{cfuncdesc}
27052691
27062692
\begin{cfuncdesc}{void}{PyEval_ReleaseLock}{}
2707-
\strong{(NEW in 1.5a3!)}
27082693
Release the global interpreter lock. The lock must have been created
27092694
earlier. This function is not available when thread support is
27102695
disabled at compile time.
27112696
\end{cfuncdesc}
27122697
27132698
\begin{cfuncdesc}{void}{PyEval_AcquireThread}{PyThreadState *tstate}
2714-
\strong{(NEW in 1.5a3!)}
27152699
Acquire the global interpreter lock and then set the current thread
27162700
state to \var{tstate}, which should not be \NULL{}. The lock must
27172701
have been created earlier. If this thread already has the lock,
@@ -2720,7 +2704,6 @@ \section{Thread State and the Global Interpreter Lock}
27202704
\end{cfuncdesc}
27212705
27222706
\begin{cfuncdesc}{void}{PyEval_ReleaseThread}{PyThreadState *tstate}
2723-
\strong{(NEW in 1.5a3!)}
27242707
Reset the current thread state to \NULL{} and release the global
27252708
interpreter lock. The lock must have been created earlier and must be
27262709
held by the current thread. The \var{tstate} argument, which must not
@@ -2731,7 +2714,6 @@ \section{Thread State and the Global Interpreter Lock}
27312714
\end{cfuncdesc}
27322715
27332716
\begin{cfuncdesc}{PyThreadState *}{PyEval_SaveThread}{}
2734-
\strong{(Different return type in 1.5a3!)}
27352717
Release the interpreter lock (if it has been created and thread
27362718
support is enabled) and reset the thread state to \NULL{},
27372719
returning the previous thread state (which is not \NULL{}). If
@@ -2741,7 +2723,6 @@ \section{Thread State and the Global Interpreter Lock}
27412723
\end{cfuncdesc}
27422724
27432725
\begin{cfuncdesc}{void}{PyEval_RestoreThread}{PyThreadState *tstate}
2744-
\strong{(Different argument type in 1.5a3!)}
27452726
Acquire the interpreter lock (if it has been created and thread
27462727
support is enabled) and set the thread state to \var{tstate}, which
27472728
must not be \NULL{}. If the lock has been created, the current
@@ -2785,7 +2766,7 @@ \section{Thread State and the Global Interpreter Lock}
27852766
27862767
All of the following functions are only available when thread support
27872768
is enabled at compile time, and must be called only when the
2788-
interpreter lock has been created. They are all new in 1.5a3.
2769+
interpreter lock has been created.
27892770
27902771
\begin{cfuncdesc}{PyInterpreterState *}{PyInterpreterState_New}{}
27912772
Create a new interpreter state object. The interpreter lock must be

0 commit comments

Comments
 (0)