Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3c4378bd
Kaydet (Commit)
3c4378bd
authored
Nis 14, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some patches by Drew Csillag; plus a few of my own uncommitted changes.
üst
12d9fc94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
4 deletions
+98
-4
api.tex
Doc/api.tex
+49
-2
api.tex
Doc/api/api.tex
+49
-2
No files found.
Doc/api.tex
Dosyayı görüntüle @
3c4378bd
...
@@ -1073,7 +1073,7 @@ for which they do not apply, they will flag a Python exception.
...
@@ -1073,7 +1073,7 @@ for which they do not apply, they will flag a Python exception.
Print an object
\var
{
o
}
, on file
\var
{
fp
}
. Returns
\code
{
-1
}
on error
Print an object
\var
{
o
}
, on file
\var
{
fp
}
. Returns
\code
{
-1
}
on error
The flags argument is used to enable certain printing
The flags argument is used to enable certain printing
options. The only option currently supported is
options. The only option currently supported is
\constant
{
Py
_
P
rint
_
RAW
}
.
\constant
{
Py
_
P
RINT
_
RAW
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyObject
_
HasAttrString
}{
PyObject *o, char *attr
_
name
}
\begin{cfuncdesc}
{
int
}{
PyObject
_
HasAttrString
}{
PyObject *o, char *attr
_
name
}
...
@@ -1721,28 +1721,40 @@ This instance of \code{PyTypeObject} represents the Python string type.
...
@@ -1721,28 +1721,40 @@ This instance of \code{PyTypeObject} represents the Python string type.
\end{cvardesc}
\end{cvardesc}
\begin{cfuncdesc}
{
int
}{
PyString
_
Check
}{
PyObject *o
}
\begin{cfuncdesc}
{
int
}{
PyString
_
Check
}{
PyObject *o
}
Returns true if the object
\var
{
o
}
is a string object.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromStringAndSize
}{
const char *v,
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromStringAndSize
}{
const char *v,
int len
}
int len
}
Returns a new string object with the value
\var
{
v
}
and length
\var
{
len
}
on success, and
\NULL
{}
on failure. If
\var
{
v
}
is
\NULL
{}
,
the contents of the string are uninitialized.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromString
}{
const char *v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromString
}{
const char *v
}
Returns a new string object with the value
\var
{
v
}
on success, and
\NULL
{}
on failure.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyString
_
Size
}{
PyObject *string
}
\begin{cfuncdesc}
{
int
}{
PyString
_
Size
}{
PyObject *string
}
Returns the length of the string in string object
\var
{
string
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
char*
}{
PyString
_
AsString
}{
PyObject *string
}
\begin{cfuncdesc}
{
char*
}{
PyString
_
AsString
}{
PyObject *string
}
Resturns a
\NULL
{}
terminated representation of the contents of
\var
{
string
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyString
_
Concat
}{
PyObject **string,
\begin{cfuncdesc}
{
void
}{
PyString
_
Concat
}{
PyObject **string,
PyObject *newpart
}
PyObject *newpart
}
Creates a new string object in
\var
{
*string
}
containing the contents
of
\var
{
newpart
}
appended to
\var
{
string
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyString
_
ConcatAndDel
}{
PyObject **string,
\begin{cfuncdesc}
{
void
}{
PyString
_
ConcatAndDel
}{
PyObject **string,
PyObject *newpart
}
PyObject *newpart
}
Creates a new string object in
\var
{
*string
}
containing the contents
of
\var
{
newpart
}
appended to
\var
{
string
}
. --WHAT IS THE
DIFFERENCE BETWEEN THIS AND PLAIN CONCAT?--
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{_
PyString
_
Resize
}{
PyObject **string, int newsize
}
\begin{cfuncdesc}
{
int
}{_
PyString
_
Resize
}{
PyObject **string, int newsize
}
...
@@ -1852,27 +1864,42 @@ Returns true if its argument is a \code{PyListObject}.
...
@@ -1852,27 +1864,42 @@ Returns true if its argument is a \code{PyListObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
New
}{
int size
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
New
}{
int size
}
Returns a new list of length
\var
{
len
}
on success, and
\NULL
{}
on
failure.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Size
}{
PyObject *list
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Size
}{
PyObject *list
}
Returns the length of the list object in
\var
{
list
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetItem
}{
PyObject *list, int index
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetItem
}{
PyObject *list, int index
}
Returns the item in
\var
{
list
}
at index
\var
{
index
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
SetItem
}{
PyObject *list, int index,
\begin{cfuncdesc}
{
int
}{
PyList
_
SetItem
}{
PyObject *list, int index,
PyObject *item
}
PyObject *item
}
Sets the item at index
\var
{
index
}
in list to
\var
{
item
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Insert
}{
PyObject *list, int index,
\begin{cfuncdesc}
{
int
}{
PyList
_
Insert
}{
PyObject *list, int index,
PyObject *index
}
PyObject *index
}
Inserts the item
\var
{
item
}
into list
\var
{
list
}
in front of index
\var
{
index
}
and returns true if successful.
For example:
\begin{verbatim}
PyList
_
Insert(list, 0, object);
\end{verbatim}
\end{cfuncdesc}
\end{cfuncdesc}
would insert
\var
{
object
}
at the front of the list.
\begin{cfuncdesc}
{
int
}{
PyList
_
Append
}{
PyObject *list, PyObject *item
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Append
}{
PyObject *list, PyObject *item
}
Appends the object
\var
{
item
}
at the end of list
\var
{
list
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetSlice
}{
PyObject *list,
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetSlice
}{
PyObject *list,
int low, int high
}
int low, int high
}
Returns a list of the objects in
\var
{
list
}
containing the objects
\emph
{
between
}
\var
{
low
}
and
\var
{
high
}
. Analogous to
\var
{
list[low:high]
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
SetSlice
}{
PyObject *list,
\begin{cfuncdesc}
{
int
}{
PyList
_
SetSlice
}{
PyObject *list,
...
@@ -1881,12 +1908,14 @@ Returns true if its argument is a \code{PyListObject}.
...
@@ -1881,12 +1908,14 @@ Returns true if its argument is a \code{PyListObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Sort
}{
PyObject *list
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Sort
}{
PyObject *list
}
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Reverse
}{
PyObject *list
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Reverse
}{
PyObject *list
}
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
AsTuple
}{
PyObject *list
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
AsTuple
}{
PyObject *list
}
Returns a new tuple object containing the contents of
\var
{
list
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GET
_
ITEM
}{
PyObject *list, int i
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GET
_
ITEM
}{
PyObject *list, int i
}
...
@@ -2051,21 +2080,29 @@ Returns true if its argument is a \code{PyLongObject}.
...
@@ -2051,21 +2080,29 @@ Returns true if its argument is a \code{PyLongObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromLong
}{
long v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromLong
}{
long v
}
Returns a new
\code
{
PyLong
}
object from
\var
{
v
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromUnsignedLong
}{
unsigned long v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromUnsignedLong
}{
unsigned long v
}
Returns a new
\code
{
PyLong
}
object from an unsigned
\C
{}
long.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromDouble
}{
double v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromDouble
}{
double v
}
Returns a new
\code
{
PyLong
}
object from the integer part of
\var
{
v
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
long
}{
PyLong
_
AsLong
}{
PyObject *pylong
}
\begin{cfuncdesc}
{
long
}{
PyLong
_
AsLong
}{
PyObject *pylong
}
Returns a
\C
{}
\code
{
long
}
representation of the contents of
\var
{
pylong
}
.
WHAT HAPPENS IF
\var
{
pylong
}
> MAXLONG?
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
unsigned long
}{
PyLong
_
AsUnsignedLong
}{
PyObject *pylong
}
\begin{cfuncdesc}
{
unsigned long
}{
PyLong
_
AsUnsignedLong
}{
PyObject *pylong
}
Returns a
\C
{}
\code
{
unsigned long
}
representation of the contents of
\var
{
pylong
}
. WHAT HAPPENS IF
\var
{
pylong
}
> MAXLONG?
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyLong
_
AsDouble
}{
PyObject *pylong
}
\begin{cfuncdesc}
{
double
}{
PyLong
_
AsDouble
}{
PyObject *pylong
}
Returns a
\C
{}
\code
{
double
}
representation of teh contents of
\var
{
pylong
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromString
}{
char *str, char **pend,
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromString
}{
char *str, char **pend,
...
@@ -2091,9 +2128,11 @@ Returns true if its argument is a \code{PyFloatObject}.
...
@@ -2091,9 +2128,11 @@ Returns true if its argument is a \code{PyFloatObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyFloat
_
FromDouble
}{
double v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyFloat
_
FromDouble
}{
double v
}
Creates a
\code
{
PyFloat
}
object from
\var
{
v
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AsDouble
}{
PyObject *pyfloat
}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AsDouble
}{
PyObject *pyfloat
}
Returns a
\C
{}
\code
{
double
}
representation of the contents of
\var
{
pyfloat
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AS
_
DOUBLE
}{
PyObject *pyfloat
}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AS
_
DOUBLE
}{
PyObject *pyfloat
}
...
@@ -2153,12 +2192,15 @@ Returns true if its argument is a \code{PyComplexObject}.
...
@@ -2153,12 +2192,15 @@ Returns true if its argument is a \code{PyComplexObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyComplex
_
FromDoubles
}{
double real, double imag
}
\begin{cfuncdesc}
{
PyObject*
}{
PyComplex
_
FromDoubles
}{
double real, double imag
}
Returns a new
\code
{
PyComplex
}
object from
\var
{
real
}
and
\var
{
imag
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
RealAsDouble
}{
PyObject *op
}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
RealAsDouble
}{
PyObject *op
}
Returns the real part of
\var
{
op
}
as a
\C
{}
\code
{
double
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
ImagAsDouble
}{
PyObject *op
}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
ImagAsDouble
}{
PyObject *op
}
Returns the imaginary part of
\var
{
op
}
as a
\C
{}
\code
{
double
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
Py
_
complex
}{
PyComplex
_
AsCComplex
}{
PyObject *op
}
\begin{cfuncdesc}
{
Py
_
complex
}{
PyComplex
_
AsCComplex
}{
PyObject *op
}
...
@@ -2854,6 +2896,11 @@ must be held.
...
@@ -2854,6 +2896,11 @@ must be held.
\begin{cfuncdesc}
{
TYPE
}{_
PyObject
_
NEW
_
VAR
}{
TYPE, PyTypeObject *, int size
}
\begin{cfuncdesc}
{
TYPE
}{_
PyObject
_
NEW
_
VAR
}{
TYPE, PyTypeObject *, int size
}
\end{cfuncdesc}
\end{cfuncdesc}
Py
_
InitModule (!!!)
PyArg
_
ParseTupleAndKeywords, PyArg
_
ParseTuple, PyArg
_
Parse
Py
_
BuildValue
PyObject, PyVarObject
PyObject, PyVarObject
...
...
Doc/api/api.tex
Dosyayı görüntüle @
3c4378bd
...
@@ -1073,7 +1073,7 @@ for which they do not apply, they will flag a Python exception.
...
@@ -1073,7 +1073,7 @@ for which they do not apply, they will flag a Python exception.
Print an object
\var
{
o
}
, on file
\var
{
fp
}
. Returns
\code
{
-1
}
on error
Print an object
\var
{
o
}
, on file
\var
{
fp
}
. Returns
\code
{
-1
}
on error
The flags argument is used to enable certain printing
The flags argument is used to enable certain printing
options. The only option currently supported is
options. The only option currently supported is
\constant
{
Py
_
P
rint
_
RAW
}
.
\constant
{
Py
_
P
RINT
_
RAW
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyObject
_
HasAttrString
}{
PyObject *o, char *attr
_
name
}
\begin{cfuncdesc}
{
int
}{
PyObject
_
HasAttrString
}{
PyObject *o, char *attr
_
name
}
...
@@ -1721,28 +1721,40 @@ This instance of \code{PyTypeObject} represents the Python string type.
...
@@ -1721,28 +1721,40 @@ This instance of \code{PyTypeObject} represents the Python string type.
\end{cvardesc}
\end{cvardesc}
\begin{cfuncdesc}
{
int
}{
PyString
_
Check
}{
PyObject *o
}
\begin{cfuncdesc}
{
int
}{
PyString
_
Check
}{
PyObject *o
}
Returns true if the object
\var
{
o
}
is a string object.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromStringAndSize
}{
const char *v,
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromStringAndSize
}{
const char *v,
int len
}
int len
}
Returns a new string object with the value
\var
{
v
}
and length
\var
{
len
}
on success, and
\NULL
{}
on failure. If
\var
{
v
}
is
\NULL
{}
,
the contents of the string are uninitialized.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromString
}{
const char *v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyString
_
FromString
}{
const char *v
}
Returns a new string object with the value
\var
{
v
}
on success, and
\NULL
{}
on failure.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyString
_
Size
}{
PyObject *string
}
\begin{cfuncdesc}
{
int
}{
PyString
_
Size
}{
PyObject *string
}
Returns the length of the string in string object
\var
{
string
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
char*
}{
PyString
_
AsString
}{
PyObject *string
}
\begin{cfuncdesc}
{
char*
}{
PyString
_
AsString
}{
PyObject *string
}
Resturns a
\NULL
{}
terminated representation of the contents of
\var
{
string
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyString
_
Concat
}{
PyObject **string,
\begin{cfuncdesc}
{
void
}{
PyString
_
Concat
}{
PyObject **string,
PyObject *newpart
}
PyObject *newpart
}
Creates a new string object in
\var
{
*string
}
containing the contents
of
\var
{
newpart
}
appended to
\var
{
string
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyString
_
ConcatAndDel
}{
PyObject **string,
\begin{cfuncdesc}
{
void
}{
PyString
_
ConcatAndDel
}{
PyObject **string,
PyObject *newpart
}
PyObject *newpart
}
Creates a new string object in
\var
{
*string
}
containing the contents
of
\var
{
newpart
}
appended to
\var
{
string
}
. --WHAT IS THE
DIFFERENCE BETWEEN THIS AND PLAIN CONCAT?--
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{_
PyString
_
Resize
}{
PyObject **string, int newsize
}
\begin{cfuncdesc}
{
int
}{_
PyString
_
Resize
}{
PyObject **string, int newsize
}
...
@@ -1852,27 +1864,42 @@ Returns true if its argument is a \code{PyListObject}.
...
@@ -1852,27 +1864,42 @@ Returns true if its argument is a \code{PyListObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
New
}{
int size
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
New
}{
int size
}
Returns a new list of length
\var
{
len
}
on success, and
\NULL
{}
on
failure.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Size
}{
PyObject *list
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Size
}{
PyObject *list
}
Returns the length of the list object in
\var
{
list
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetItem
}{
PyObject *list, int index
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetItem
}{
PyObject *list, int index
}
Returns the item in
\var
{
list
}
at index
\var
{
index
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
SetItem
}{
PyObject *list, int index,
\begin{cfuncdesc}
{
int
}{
PyList
_
SetItem
}{
PyObject *list, int index,
PyObject *item
}
PyObject *item
}
Sets the item at index
\var
{
index
}
in list to
\var
{
item
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Insert
}{
PyObject *list, int index,
\begin{cfuncdesc}
{
int
}{
PyList
_
Insert
}{
PyObject *list, int index,
PyObject *index
}
PyObject *index
}
Inserts the item
\var
{
item
}
into list
\var
{
list
}
in front of index
\var
{
index
}
and returns true if successful.
For example:
\begin{verbatim}
PyList
_
Insert(list, 0, object);
\end{verbatim}
\end{cfuncdesc}
\end{cfuncdesc}
would insert
\var
{
object
}
at the front of the list.
\begin{cfuncdesc}
{
int
}{
PyList
_
Append
}{
PyObject *list, PyObject *item
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Append
}{
PyObject *list, PyObject *item
}
Appends the object
\var
{
item
}
at the end of list
\var
{
list
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetSlice
}{
PyObject *list,
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GetSlice
}{
PyObject *list,
int low, int high
}
int low, int high
}
Returns a list of the objects in
\var
{
list
}
containing the objects
\emph
{
between
}
\var
{
low
}
and
\var
{
high
}
. Analogous to
\var
{
list[low:high]
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
SetSlice
}{
PyObject *list,
\begin{cfuncdesc}
{
int
}{
PyList
_
SetSlice
}{
PyObject *list,
...
@@ -1881,12 +1908,14 @@ Returns true if its argument is a \code{PyListObject}.
...
@@ -1881,12 +1908,14 @@ Returns true if its argument is a \code{PyListObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Sort
}{
PyObject *list
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Sort
}{
PyObject *list
}
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
Reverse
}{
PyObject *list
}
\begin{cfuncdesc}
{
int
}{
PyList
_
Reverse
}{
PyObject *list
}
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
AsTuple
}{
PyObject *list
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
AsTuple
}{
PyObject *list
}
Returns a new tuple object containing the contents of
\var
{
list
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GET
_
ITEM
}{
PyObject *list, int i
}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
GET
_
ITEM
}{
PyObject *list, int i
}
...
@@ -2051,21 +2080,29 @@ Returns true if its argument is a \code{PyLongObject}.
...
@@ -2051,21 +2080,29 @@ Returns true if its argument is a \code{PyLongObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromLong
}{
long v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromLong
}{
long v
}
Returns a new
\code
{
PyLong
}
object from
\var
{
v
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromUnsignedLong
}{
unsigned long v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromUnsignedLong
}{
unsigned long v
}
Returns a new
\code
{
PyLong
}
object from an unsigned
\C
{}
long.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromDouble
}{
double v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromDouble
}{
double v
}
Returns a new
\code
{
PyLong
}
object from the integer part of
\var
{
v
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
long
}{
PyLong
_
AsLong
}{
PyObject *pylong
}
\begin{cfuncdesc}
{
long
}{
PyLong
_
AsLong
}{
PyObject *pylong
}
Returns a
\C
{}
\code
{
long
}
representation of the contents of
\var
{
pylong
}
.
WHAT HAPPENS IF
\var
{
pylong
}
> MAXLONG?
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
unsigned long
}{
PyLong
_
AsUnsignedLong
}{
PyObject *pylong
}
\begin{cfuncdesc}
{
unsigned long
}{
PyLong
_
AsUnsignedLong
}{
PyObject *pylong
}
Returns a
\C
{}
\code
{
unsigned long
}
representation of the contents of
\var
{
pylong
}
. WHAT HAPPENS IF
\var
{
pylong
}
> MAXLONG?
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyLong
_
AsDouble
}{
PyObject *pylong
}
\begin{cfuncdesc}
{
double
}{
PyLong
_
AsDouble
}{
PyObject *pylong
}
Returns a
\C
{}
\code
{
double
}
representation of teh contents of
\var
{
pylong
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromString
}{
char *str, char **pend,
\begin{cfuncdesc}
{
PyObject*
}{
PyLong
_
FromString
}{
char *str, char **pend,
...
@@ -2091,9 +2128,11 @@ Returns true if its argument is a \code{PyFloatObject}.
...
@@ -2091,9 +2128,11 @@ Returns true if its argument is a \code{PyFloatObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyFloat
_
FromDouble
}{
double v
}
\begin{cfuncdesc}
{
PyObject*
}{
PyFloat
_
FromDouble
}{
double v
}
Creates a
\code
{
PyFloat
}
object from
\var
{
v
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AsDouble
}{
PyObject *pyfloat
}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AsDouble
}{
PyObject *pyfloat
}
Returns a
\C
{}
\code
{
double
}
representation of the contents of
\var
{
pyfloat
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AS
_
DOUBLE
}{
PyObject *pyfloat
}
\begin{cfuncdesc}
{
double
}{
PyFloat
_
AS
_
DOUBLE
}{
PyObject *pyfloat
}
...
@@ -2153,12 +2192,15 @@ Returns true if its argument is a \code{PyComplexObject}.
...
@@ -2153,12 +2192,15 @@ Returns true if its argument is a \code{PyComplexObject}.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyComplex
_
FromDoubles
}{
double real, double imag
}
\begin{cfuncdesc}
{
PyObject*
}{
PyComplex
_
FromDoubles
}{
double real, double imag
}
Returns a new
\code
{
PyComplex
}
object from
\var
{
real
}
and
\var
{
imag
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
RealAsDouble
}{
PyObject *op
}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
RealAsDouble
}{
PyObject *op
}
Returns the real part of
\var
{
op
}
as a
\C
{}
\code
{
double
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
ImagAsDouble
}{
PyObject *op
}
\begin{cfuncdesc}
{
double
}{
PyComplex
_
ImagAsDouble
}{
PyObject *op
}
Returns the imaginary part of
\var
{
op
}
as a
\C
{}
\code
{
double
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
Py
_
complex
}{
PyComplex
_
AsCComplex
}{
PyObject *op
}
\begin{cfuncdesc}
{
Py
_
complex
}{
PyComplex
_
AsCComplex
}{
PyObject *op
}
...
@@ -2854,6 +2896,11 @@ must be held.
...
@@ -2854,6 +2896,11 @@ must be held.
\begin{cfuncdesc}
{
TYPE
}{_
PyObject
_
NEW
_
VAR
}{
TYPE, PyTypeObject *, int size
}
\begin{cfuncdesc}
{
TYPE
}{_
PyObject
_
NEW
_
VAR
}{
TYPE, PyTypeObject *, int size
}
\end{cfuncdesc}
\end{cfuncdesc}
Py
_
InitModule (!!!)
PyArg
_
ParseTupleAndKeywords, PyArg
_
ParseTuple, PyArg
_
Parse
Py
_
BuildValue
PyObject, PyVarObject
PyObject, PyVarObject
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment