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
5e0dfacc
Kaydet (Commit)
5e0dfacc
authored
Mar 23, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update to the most recent weakref changes.
üst
b0fefc51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
libweakref.tex
Doc/lib/libweakref.tex
+4
-11
No files found.
Doc/lib/libweakref.tex
Dosyayı görüntüle @
5e0dfacc
...
...
@@ -16,17 +16,11 @@ The \module{weakref} module allows the Python programmer to create
XXX --- need to say more here!
Not all objects can be weakly referenced; those objects which do
include class instances and dictionaries. Extension types can easily
include class instances, functions written in Python (but not in C),
and methods (both bound and unbound). Extension types can easily
be made to support weak references; see section
\ref
{
weakref-extension
}
,
``Weak References in Extension Types,'' for more information.
\strong
{
Warning:
}
The desired semantics of weak-reference proxy objects are not
completely clear; it is very difficult to create proxies which behave
exactly like the type of the referent. The details of these objects
are likely to change to some degree before the final release as
experience reports become available.
\begin{funcdesc}
{
ref
}{
object
\optional
{
, callback
}}
Return a weak reference to
\var
{
object
}
. If
\var
{
callback
}
is
...
...
@@ -56,7 +50,6 @@ experience reports become available.
\var
{
object
}
is still alive, to references are equal if the objects
are equal (regardless of the
\var
{
callback
}
). If the
\var
{
object
}
has been deleted, they are equal iff they are identical.
\end{funcdesc}
\begin{funcdesc}
{
mapping
}{
\optional
{
dict
\optional
{
, weakkeys=0
}}}
...
...
@@ -198,8 +191,8 @@ overhead on those objects which do not benefit by weak referencing
For an object to be weakly referencable, the extension must include a
\ctype
{
PyObject *
}
field in the instance structure for the use of the
weak reference mechanism; it
will be initialized by Python's functions
for object creation. It must also set the
\code
{
tp
_
weaklistoffset
}
weak reference mechanism; it
must be initialized to
\NULL
{}
by the
object's constructor. It must also set the
\member
{
tp
_
weaklistoffset
}
field of the corresponding type object to the offset of the field.
For example, the instance type is defined with the following structure:
...
...
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