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
630a63ca
Kaydet (Commit)
630a63ca
authored
Agu 01, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix description of buffer_info(), and add a note that there is a better
way... This closes SF bug #444842.
üst
5a99e0ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
libarray.tex
Doc/lib/libarray.tex
+15
-6
No files found.
Doc/lib/libarray.tex
Dosyayı görüntüle @
630a63ca
...
...
@@ -68,12 +68,21 @@ Append a new item with value \var{x} to the end of the array.
\begin{methoddesc}
[array]
{
buffer
_
info
}{}
Return a tuple
\code
{
(
\var
{
address
}
,
\var
{
length
}
)
}
giving the current
memory address and the length in bytes of the buffer used to hold
array's contents. This is occasionally useful when working with
memory address and the length in elements of the buffer used to hold
array's contents. The size of the memory buffer in bytes can be
computed as
\code
{
\var
{
array
}
.buffer
_
info()[1] *
\var
{
array
}
.itemsize
}
. This is occasionally useful when working with
low-level (and inherently unsafe) I/O interfaces that require memory
addresses, such as certain
\cfunction
{
ioctl()
}
operations. The returned
numbers are valid as long as the array exists and no length-changing
operations are applied to it.
addresses, such as certain
\cfunction
{
ioctl()
}
operations. The
returned numbers are valid as long as the array exists and no
length-changing operations are applied to it.
\strong
{
Note:
}
When using array objects from code written in C or
\Cpp
{}
(the only way to effectively make use of this information), it
makes more sense to use the buffer interface supported by array
objects. This method is maintained for backward compatibility and
should be avoided in new code. The buffer interface is documented in
the
\citetitle
[../api/newTypes.html]
{
Python/C API Reference Manual
}
.
\end{methoddesc}
\begin{methoddesc}
[array]
{
byteswap
}{}
...
...
@@ -174,7 +183,7 @@ string if the \var{typecode} is \code{'c'}, otherwise it is a list of
numbers. The string is guaranteed to be able to be converted back to
an array with the same type and value using reverse quotes
(
\code
{
``
}
), so long as the
\function
{
array()
}
function has been
imported using
\
samp
{
from array import array
}
. Examples:
imported using
\
code
{
from array import array
}
. Examples:
\begin{verbatim}
array('l')
...
...
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