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
861bb024
Kaydet (Commit)
861bb024
authored
Agu 07, 2002
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Describe nested scopes in the tutorial. Closes SF bug 500704.
üst
29bf9157
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
tut.tex
Doc/tut/tut.tex
+11
-6
No files found.
Doc/tut/tut.tex
Dosyayı görüntüle @
861bb024
...
@@ -3551,12 +3551,17 @@ that an unqualified reference to a name attempts to find the name in
...
@@ -3551,12 +3551,17 @@ that an unqualified reference to a name attempts to find the name in
the namespace.
the namespace.
Although scopes are determined statically, they are used dynamically.
Although scopes are determined statically, they are used dynamically.
At any time during execution, exactly three nested scopes are in use
At any time during execution, there are at least three nested scopes whose
(exactly three namespaces are directly accessible): the
namespaces are directly accessible: the innermost scope, which is searched
innermost scope, which is searched first, contains the local names,
first, contains the local names; the namespaces of any enclosing code
the middle scope, searched next, contains the current module's global
blocks (a module, function, or class definition) which are searched starting
names, and the outermost scope (searched last) is the namespace
with the nearest enclosing scope; the middle scope, searched next, contains
containing built-in names.
the current module's global names; and the outermost scope (searched last)
is the namespace containing built-in names.
If a name is declared global, then all references and assignments go
directly to the middle scope containing the module's global names.
Otherwise, all variables found outside of the innermost scope are read-only.
Usually, the local scope references the local names of the (textually)
Usually, the local scope references the local names of the (textually)
current function. Outside of functions, the local scope references
current function. Outside of functions, the local scope references
...
...
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