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
b62f0e1a
Kaydet (Commit)
b62f0e1a
authored
Ara 07, 2001
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Correct the description of im_class. (Fred, this is changed in 2.2.
Should this be labeled as changed? How?)
üst
79619305
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
libinspect.tex
Doc/lib/libinspect.tex
+1
-1
ref3.tex
Doc/ref/ref3.tex
+5
-6
No files found.
Doc/lib/libinspect.tex
Dosyayı görüntüle @
b62f0e1a
...
...
@@ -39,7 +39,7 @@ you can expect to find the following special attributes:
\hline
\lineiii
{
method
}{__
doc
__}{
documentation string
}
\lineiii
{}{__
name
__}{
name with which this method was defined
}
\lineiii
{}{
im
_
class
}{
class object
in which this method belongs
}
\lineiii
{}{
im
_
class
}{
class object
that asked for this method
}
\lineiii
{}{
im
_
func
}{
function object containing implementation of method
}
\lineiii
{}{
im
_
self
}{
instance to which this method is bound, or
\code
{
None
}}
\hline
...
...
Doc/ref/ref3.tex
Dosyayı görüntüle @
b62f0e1a
...
...
@@ -447,8 +447,8 @@ function).
Special read-only attributes:
\member
{
im
_
self
}
is the class instance
object,
\member
{
im
_
func
}
is the function object;
\member
{
im
_
class
}
is the class
that defined the method (which may be a
base class of the class of which
\member
{
im
_
self
}
is an instance
);
\member
{
im
_
class
}
is the class
of
\member
{
im
_
self
}
for bound methods,
or the class that asked for the method for unbound methods
);
\member
{__
doc
__}
is the method's documentation (same as
\code
{
im
_
func.
__
doc
__}
);
\member
{__
name
__}
is the method name (same as
\code
{
im
_
func.
__
name
__}
).
...
...
@@ -467,8 +467,8 @@ case (class attribute), the \member{im_self} attribute is \code{None},
and the method object is said to be unbound; in the latter case
(instance attribute),
\method
{
im
_
self
}
is the instance, and the method
object is said to be bound. For
instance, when
\class
{
C
}
is a class which
contains a definition for a
function
\method
{
f()
}
,
\code
{
C.f
}
does not yield the function object
instance, when
\class
{
C
}
is a class which
has a method
\method
{
f()
}
,
\code
{
C.f
}
does not yield the function object
\code
{
f
}
; rather, it yields an unbound method object
\code
{
m
}
where
\code
{
m.im
_
class
}
is
\class
{
C
}
,
\code
{
m.im
_
func
}
is
\method
{
f()
}
, and
\code
{
m.im
_
self
}
is
\code
{
None
}
. When
\code
{
x
}
is a
\class
{
C
}
...
...
@@ -597,7 +597,6 @@ base class list.
When a class attribute reference would yield a user-defined function
object, it is transformed into an unbound user-defined method object
(see above). The
\member
{
im
_
class
}
attribute of this method object is the
class in which the function object was found, not necessarily the
class for which the attribute reference was initiated.
\obindex
{
class
}
\obindex
{
class instance
}
...
...
@@ -639,7 +638,7 @@ the search continues with the class attributes. If a class attribute
is found that is a user-defined function object (and in no other
case), it is transformed into an unbound user-defined method object
(see above). The
\member
{
im
_
class
}
attribute of this method object is
the
class in which the function object was found, not necessarily the
the
class of the instance for which the attribute reference was initiated.
If no class attribute is found, and the object's class has a
\method
{__
getattr
__
()
}
method, that is called to satisfy the lookup.
...
...
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