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
cd259bfd
Kaydet (Commit)
cd259bfd
authored
Ara 18, 2016
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge: #29005: clarify terminology in tutorial 'method' discussion.
üst
59b0eb52
4ec1590f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
classes.rst
Doc/tutorial/classes.rst
+2
-3
No files found.
Doc/tutorial/classes.rst
Dosyayı görüntüle @
cd259bfd
...
@@ -374,11 +374,11 @@ Surely Python raises an exception when a function that requires an argument is
...
@@ -374,11 +374,11 @@ Surely Python raises an exception when a function that requires an argument is
called without any --- even if the argument isn't actually used...
called without any --- even if the argument isn't actually used...
Actually, you may have guessed the answer: the special thing about methods is
Actually, you may have guessed the answer: the special thing about methods is
that the object is passed as the first argument of the function. In our
that the
instance
object is passed as the first argument of the function. In our
example, the call ``x.f()`` is exactly equivalent to ``MyClass.f(x)``. In
example, the call ``x.f()`` is exactly equivalent to ``MyClass.f(x)``. In
general, calling a method with a list of *n* arguments is equivalent to calling
general, calling a method with a list of *n* arguments is equivalent to calling
the corresponding function with an argument list that is created by inserting
the corresponding function with an argument list that is created by inserting
the method's object before the first argument.
the method's
instance
object before the first argument.
If you still don't understand how methods work, a look at the implementation can
If you still don't understand how methods work, a look at the implementation can
perhaps clarify matters. When an instance attribute is referenced that isn't a
perhaps clarify matters. When an instance attribute is referenced that isn't a
...
@@ -906,4 +906,3 @@ Examples::
...
@@ -906,4 +906,3 @@ Examples::
namespace; the name :attr:`~object.__dict__` is an attribute but not a global name.
namespace; the name :attr:`~object.__dict__` is an attribute but not a global name.
Obviously, using this violates the abstraction of namespace implementation, and
Obviously, using this violates the abstraction of namespace implementation, and
should be restricted to things like post-mortem debuggers.
should be restricted to things like post-mortem debuggers.
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