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
044bb4d2
Kaydet (Commit)
044bb4d2
authored
Agu 02, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Explain that __init__() methods do not get to return values.
üst
2b8d7bdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
ref3.tex
Doc/ref/ref3.tex
+9
-8
No files found.
Doc/ref/ref3.tex
Dosyayı görüntüle @
044bb4d2
...
...
@@ -892,14 +892,15 @@ extracting a slice may not make sense. (One example of this is the
\subsection
{
Basic customization
\label
{
customization
}}
\begin{methoddesc}
[object]
{__
init
__}{
self
\optional
{
, args...
}}
Called when the instance is created. The arguments are those passed
to the class constructor expression. If a base class has an
\method
{__
init
__
()
}
method the derived class's
\method
{__
init
__
()
}
method must
explicitly call it to ensure proper initialization of the base class
part of the instance, e.g.,
\samp
{
BaseClass.
__
init
__
(
\var
{
self
}
,
[
\var
{
args
}
...])
}
.
\indexii
{
class
}{
constructor
}
\begin{methoddesc}
[object]
{__
init
__}{
self
\optional
{
,
\moreargs
}}
Called
\indexii
{
class
}{
constructor
}
when the instance is created. The
arguments are those passed to the class constructor expression. If a
base class has an
\method
{__
init
__
()
}
method the derived class's
\method
{__
init
__
()
}
method must explicitly call it to ensure proper
initialization of the base class part of the instance; for example:
\samp
{
BaseClass.
__
init
__
(
\var
{
self
}
, [
\var
{
args
}
...])
}
. As a special
contraint on constructors, no value may be returned; doing so will
cause a
\exception
{
TypeError
}
to be raised at runtime.
\end{methoddesc}
...
...
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