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
dace77c5
Kaydet (Commit)
dace77c5
authored
Eyl 30, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #28815: Change '?' to '<module>' in some doc examples.
Patch by Mariatta Wijaya.
üst
67edf731
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
errors.rst
Doc/tutorial/errors.rst
+9
-9
ACKS
Misc/ACKS
+1
-0
No files found.
Doc/tutorial/errors.rst
Dosyayı görüntüle @
dace77c5
...
...
@@ -18,7 +18,7 @@ Syntax errors, also known as parsing errors, are perhaps the most common kind of
complaint you get while you are still learning Python::
>>> while True print 'Hello world'
File "<stdin>", line 1
, in ?
File "<stdin>", line 1
while True print 'Hello world'
^
SyntaxError: invalid syntax
...
...
@@ -44,15 +44,15 @@ programs, however, and result in error messages as shown here::
>>> 10 * (1/0)
Traceback (most recent call last):
File "<stdin>", line 1, in
?
File "<stdin>", line 1, in
<module>
ZeroDivisionError: integer division or modulo by zero
>>> 4 + spam*3
Traceback (most recent call last):
File "<stdin>", line 1, in
?
File "<stdin>", line 1, in
<module>
NameError: name 'spam' is not defined
>>> '2' + 2
Traceback (most recent call last):
File "<stdin>", line 1, in
?
File "<stdin>", line 1, in
<module>
TypeError: cannot concatenate 'str' and 'int' objects
The last line of the error message indicates what happened. Exceptions come in
...
...
@@ -223,7 +223,7 @@ exception to occur. For example::
>>> raise NameError('HiThere')
Traceback (most recent call last):
File "<stdin>", line 1, in
?
File "<stdin>", line 1, in
<module>
NameError: HiThere
The sole argument to :keyword:`raise` indicates the exception to be raised.
...
...
@@ -242,7 +242,7 @@ re-raise the exception::
...
An exception flew by!
Traceback (most recent call last):
File "<stdin>", line 2, in
?
File "<stdin>", line 2, in
<module>
NameError: HiThere
...
...
@@ -270,7 +270,7 @@ example::
My exception occurred, value: 4
>>> raise MyError('oops!')
Traceback (most recent call last):
File "<stdin>", line 1, in
?
File "<stdin>", line 1, in
<module>
__main__.MyError: 'oops!'
In this example, the default :meth:`__init__` of :class:`Exception` has been
...
...
@@ -339,7 +339,7 @@ example::
...
Goodbye, world!
Traceback (most recent call last):
File "<stdin>", line 2, in
?
File "<stdin>", line 2, in
<module>
KeyboardInterrupt
A *finally clause* is always executed before leaving the :keyword:`try`
...
...
@@ -372,7 +372,7 @@ the same :keyword:`try` statement works as of Python 2.5)::
>>> divide("2", "1")
executing finally clause
Traceback (most recent call last):
File "<stdin>", line 1, in
?
File "<stdin>", line 1, in
<module>
File "<stdin>", line 3, in divide
TypeError: unsupported operand type(s) for /: 'str' and 'str'
...
...
Misc/ACKS
Dosyayı görüntüle @
dace77c5
...
...
@@ -1494,6 +1494,7 @@ Truida Wiedijk
Felix Wiemann
Gerry Wiener
Frank Wierzbicki
Mariatta Wijaya
Santoso Wijaya
Bryce "Zooko" Wilcox-O'Hearn
Timothy Wild
...
...
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