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
fbee8824
Kaydet (Commit)
fbee8824
authored
Şub 25, 2018
tarafından
Mario Corchero
Kaydeden (comit)
Mariatta
Şub 25, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)
üst
84c4b0cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
modules.rst
Doc/tutorial/modules.rst
+19
-0
No files found.
Doc/tutorial/modules.rst
Dosyayı görüntüle @
fbee8824
...
...
@@ -112,6 +112,25 @@ Note that in general the practice of importing ``*`` from a module or package is
frowned
upon
,
since
it
often
causes
poorly
readable
code
.
However
,
it
is
okay
to
use
it
to
save
typing
in
interactive
sessions
.
If
the
module
name
is
followed
by
:
keyword
:`
as
`,
then
the
name
following
:
keyword
:`
as
`
is
bound
directly
to
the
imported
module
.
::
>>>
import
fibo
as
fib
>>>
fib
.
fib
(
500
)
0
1
1
2
3
5
8
13
21
34
55
89
144
233
377
This
is
effectively
importing
the
module
in
the
same
way
that
``
import
fibo
``
will
do
,
with
the
only
difference
of
it
being
available
as
``
fib
``.
It
can
also
be
used
when
utilising
:
keyword
:`
from
`
with
similar
effects
::
>>>
from
fibo
import
fib
as
fibonacci
>>>
fibonacci
(
500
)
0
1
1
2
3
5
8
13
21
34
55
89
144
233
377
..
note
::
For
efficiency
reasons
,
each
module
is
only
imported
once
per
interpreter
...
...
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