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
624f3372
Kaydet (Commit)
624f3372
authored
Mar 31, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#5529: backport new docs of import semantics written by Brett to 2.x.
üst
21b60afd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
glossary.rst
Doc/glossary.rst
+14
-0
sys.rst
Doc/library/sys.rst
+37
-0
simple_stmts.rst
Doc/reference/simple_stmts.rst
+0
-0
No files found.
Doc/glossary.rst
Dosyayı görüntüle @
624f3372
...
@@ -185,6 +185,11 @@ Glossary
...
@@ -185,6 +185,11 @@ Glossary
A module written in C or C++, using Python's C API to interact with the core and
A module written in C or C++, using Python's C API to interact with the core and
with user code.
with user code.
finder
An object that tries to find the :term:`loader` for a module. It must
implement a method named :meth:`find_module`. See :pep:`302` for
details.
function
function
A series of statements which returns some value to a caller. It can also
A series of statements which returns some value to a caller. It can also
be passed zero or more arguments which may be used in the execution of
be passed zero or more arguments which may be used in the execution of
...
@@ -288,6 +293,10 @@ Glossary
...
@@ -288,6 +293,10 @@ Glossary
fraction. Integer division can be forced by using the ``//`` operator
fraction. Integer division can be forced by using the ``//`` operator
instead of the ``/`` operator. See also :term:`__future__`.
instead of the ``/`` operator. See also :term:`__future__`.
importer
An object that both finds and loads a module; both a
:term:`finder` and :term:`loader` object.
interactive
interactive
Python has an interactive interpreter which means you can enter
Python has an interactive interpreter which means you can enter
statements and expressions at the interpreter prompt, immediately
statements and expressions at the interpreter prompt, immediately
...
@@ -368,6 +377,11 @@ Glossary
...
@@ -368,6 +377,11 @@ Glossary
clause is optional. If omitted, all elements in ``range(256)`` are
clause is optional. If omitted, all elements in ``range(256)`` are
processed.
processed.
loader
An object that loads a module. It must define a method named
:meth:`load_module`. A loader is typically returned by a
:term:`finder`. See :pep:`302` for details.
mapping
mapping
A container object (such as :class:`dict`) which supports arbitrary key
A container object (such as :class:`dict`) which supports arbitrary key
lookups using the special method :meth:`__getitem__`.
lookups using the special method :meth:`__getitem__`.
...
...
Doc/library/sys.rst
Dosyayı görüntüle @
624f3372
...
@@ -554,6 +554,22 @@ always available.
...
@@ -554,6 +554,22 @@ always available.
characters are stored as UCS-2 or UCS-4.
characters are stored as UCS-2 or UCS-4.
.. data:: meta_path
A list of :term:`finder` objects that have their :meth:`find_module`
methods called to see if one of the objects can find the module to be
imported. The :meth:`find_module` method is called at least with the
absolute name of the module being imported. If the module to be imported is
contained in package then the parent package's :attr:`__path__` attribute
is passed in as a second argument. The method returns :keyword:`None` if
the module cannot be found, else returns a :term:`loader`.
:data:`sys.meta_path` is searched before any implicit default finders or
:data:`sys.path`.
See :pep:`302` for the original specification.
.. data:: modules
.. data:: modules
.. index:: builtin: reload
.. index:: builtin: reload
...
@@ -590,6 +606,27 @@ always available.
...
@@ -590,6 +606,27 @@ always available.
:data:`sys.path`.
:data:`sys.path`.
.. data:: path_hooks
A list of callables that take a path argument to try to create a
:term:`finder` for the path. If a finder can be created, it is to be
returned by the callable, else raise :exc:`ImportError`.
Originally specified in :pep:`302`.
.. data:: path_importer_cache
A dictionary acting as a cache for :term:`finder` objects. The keys are
paths that have been passed to :data:`sys.path_hooks` and the values are
the finders that are found. If a path is a valid file system path but no
explicit finder is found on :data:`sys.path_hooks` then :keyword:`None` is
stored to represent the implicit default finder should be used. If the path
is not an existing path then :class:`imp.NullImporter` is set.
Originally specified in :pep:`302`.
.. data:: platform
.. data:: platform
This string contains a platform identifier that can be used to append
This string contains a platform identifier that can be used to append
...
...
Doc/reference/simple_stmts.rst
Dosyayı görüntüle @
624f3372
This diff is collapsed.
Click to expand it.
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