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
c7526f5b
Kaydet (Commit)
c7526f5b
authored
Eyl 10, 2007
tarafından
Collin Winter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More two-argument raise cleanup in the tutorial.
üst
1fc035ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
errors.rst
Doc/tutorial/errors.rst
+3
-4
No files found.
Doc/tutorial/errors.rst
Dosyayı görüntüle @
c7526f5b
...
@@ -221,10 +221,9 @@ exception to occur. For example::
...
@@ -221,10 +221,9 @@ exception to occur. For example::
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
NameError: HiThere
NameError: HiThere
The first argument to :keyword:`raise` names the exception to be raised. The
The sole argument to :keyword:`raise` indicates the exception to be raised.
optional second argument specifies the exception's argument. Alternatively, the
This must be either an exception instance or an exception class (a class that
above could be written as ``raise NameError('HiThere')``. Either form works
derives from :class:`Exception`).
fine, but there seems to be a growing stylistic preference for the latter.
If you need to determine whether an exception was raised but don't intend to
If you need to determine whether an exception was raised but don't intend to
handle it, a simpler form of the :keyword:`raise` statement allows you to
handle it, a simpler form of the :keyword:`raise` statement allows you to
...
...
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