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
e51d1d11
Kaydet (Commit)
e51d1d11
authored
Agu 07, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1769002: fix a now-wrong sentence in the tutorial.
(backport from rev. 56797)
üst
36fe3c0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
tut.tex
Doc/tut/tut.tex
+6
-7
No files found.
Doc/tut/tut.tex
Dosyayı görüntüle @
e51d1d11
...
...
@@ -2966,15 +2966,14 @@ which the current module is a submodule), the \keyword{import}
statement looks for a top-level module with the given name.
When packages are structured into subpackages (as with the
\module
{
sound
}
package in the example), there's no shortcut to refer
to submodules of sibling packages - the full name of the subpackage
must be used. For example, if the module
\module
{
sound.filters.vocoder
}
needs to use the
\module
{
echo
}
module
in the
\module
{
sound.effects
}
package, it can use
\code
{
from
sound.effects import echo
}
.
\module
{
sound
}
package in the example), you can use absolute
imports to refer to submodules of siblings packages.
For example, if the module
\module
{
sound.filters.vocoder
}
needs to
use the
\module
{
echo
}
module in the
\module
{
sound.effects
}
package,
it can use
\code
{
from sound.effects import echo
}
.
Starting with Python 2.5, in addition to the implicit relative imports
described above, you can write explicit relative imports with the
described above, you can
also
write explicit relative imports with the
\code
{
from module import name
}
form of import statement. These explicit
relative imports use leading dots to indicate the current and parent
packages involved in the relative import. From the
\module
{
surround
}
...
...
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