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
1e829540
Kaydet (Commit)
1e829540
authored
Nis 12, 2019
tarafından
Sebastian Rittau
Kaydeden (comit)
Guido van Rossum
Nis 12, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-35581: Document @typing.type_check_only (GH-11312)
üst
1e2ad6c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
typing.rst
Doc/library/typing.rst
+18
-0
2018-12-25-12-56-57.bpo-35581.aA7r6T.rst
...xt/Documentation/2018-12-25-12-56-57.bpo-35581.aA7r6T.rst
+2
-0
No files found.
Doc/library/typing.rst
Dosyayı görüntüle @
1e829540
...
...
@@ -951,6 +951,24 @@ The module defines the following classes, functions and decorators:
This wraps the decorator with something that wraps the decorated
function in :func:`no_type_check`.
.. decorator:: type_check_only
Decorator to mark a class or function to be unavailable at runtime.
This decorator is itself not available at runtime. It is mainly
intended to mark classes that are defined in type stub files if
an implementation returns an instance of a private class::
@type_check_only
class Response: # private or not available at runtime
code: int
def get_header(self, name: str) -> str: ...
def fetch_response() -> Response: ...
Note that returning instances of private classes is not recommended.
It is usually preferable to make such classes public.
.. data:: Any
Special type indicating an unconstrained type.
...
...
Misc/NEWS.d/next/Documentation/2018-12-25-12-56-57.bpo-35581.aA7r6T.rst
0 → 100644
Dosyayı görüntüle @
1e829540
@typing.type_check_only now allows type stubs to mark functions and classes not available during runtime.
\ No newline at end of file
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