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
2d772041
Kaydet (Commit)
2d772041
authored
Haz 14, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #17907: Document types.ModuleType's constructor and attributes,
allowing for documenting imp.new_module() as deprecated.
üst
05a647de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
imp.rst
Doc/library/imp.rst
+3
-0
types.rst
Doc/library/types.rst
+28
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/imp.rst
Dosyayı görüntüle @
2d772041
...
...
@@ -112,6 +112,9 @@ This module provides an interface to the mechanisms used to implement the
Return a new empty module object called *name*. This object is *not* inserted
in ``sys.modules``.
.. deprecated:: 3.4
Use :class:`types.ModuleType` instead.
.. function:: reload(module)
...
...
Doc/library/types.rst
Dosyayı görüntüle @
2d772041
...
...
@@ -107,9 +107,35 @@ Standard names are defined for the following types:
C".)
..
data:: ModuleType
..
class:: ModuleType(name, doc=None)
The type of modules.
The type of :term:`modules <module>`. Constructor takes the name of the
module to be created and optionally its :term:`docstring`.
.. attribute:: __doc__
The :term:`docstring` of the module. Defaults to ``None``.
.. attribute:: __loader__
The :term:`loader` which loaded the module. Defaults to ``None``.
.. versionchanged:: 3.4
Defaults to ``None``. Previously the attribute was optional.
.. attribute:: __name__
The name of the module.
.. attribute:: __package__
Which :term:`package` a module belongs to. If the module is top-level
(i.e. not a part of any specific package) then the attribute should be set
to ``''``, else it should be set to the name of the package (which can be
:attr:`__name__` if the module is a package itself). Defaults to ``None``.
.. versionchanged:: 3.4
Defaults to ``None``. Previously the attribute was optional.
.. data:: TracebackType
...
...
Misc/NEWS
Dosyayı görüntüle @
2d772041
...
...
@@ -123,6 +123,9 @@ Core and Builtins
Library
-------
-
Issue
#
17907
:
Document
imp
.
new_module
()
as
deprecated
in
favour
of
types
.
ModuleType
.
-
Issue
#
18192
:
Introduce
importlib
.
util
.
MAGIC_NUMBER
and
document
as
deprecated
imp
.
get_magic
().
...
...
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