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
e80b658d
Kaydet (Commit)
e80b658d
authored
Haz 14, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #27238: Got rid of bare excepts in the turtle module. Original patch
by Jelle Zijlstra.
üst
319a57c3
cefa9172
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
turtle.py
Lib/turtle.py
+9
-9
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/turtle.py
Dosyayı görüntüle @
e80b658d
...
...
@@ -179,7 +179,7 @@ def config_dict(filename):
continue
try
:
key
,
value
=
line
.
split
(
"="
)
except
:
except
ValueError
:
print
(
"Bad line in config-file
%
s:
\n
%
s"
%
(
filename
,
line
))
continue
key
=
key
.
strip
()
...
...
@@ -192,7 +192,7 @@ def config_dict(filename):
value
=
float
(
value
)
else
:
value
=
int
(
value
)
except
:
except
ValueError
:
pass
# value need not be converted
cfgdict
[
key
]
=
value
return
cfgdict
...
...
@@ -220,7 +220,7 @@ def readconfig(cfgdict):
try
:
head
,
tail
=
split
(
__file__
)
cfg_file2
=
join
(
head
,
default_cfg
)
except
:
except
Exception
:
cfg_file2
=
""
if
isfile
(
cfg_file2
):
cfgdict2
=
config_dict
(
cfg_file2
)
...
...
@@ -229,7 +229,7 @@ def readconfig(cfgdict):
try
:
readconfig
(
_CFG
)
except
:
except
Exception
:
print
(
"No configfile read, reason unknown"
)
...
...
@@ -653,7 +653,7 @@ class TurtleScreenBase(object):
x
,
y
=
(
self
.
cv
.
canvasx
(
event
.
x
)
/
self
.
xscale
,
-
self
.
cv
.
canvasy
(
event
.
y
)
/
self
.
yscale
)
fun
(
x
,
y
)
except
:
except
Exception
:
pass
self
.
cv
.
tag_bind
(
item
,
"<Button
%
s-Motion>"
%
num
,
eventfun
,
add
)
...
...
@@ -1158,7 +1158,7 @@ class TurtleScreen(TurtleScreenBase):
raise
TurtleGraphicsError
(
"bad color string:
%
s"
%
str
(
color
))
try
:
r
,
g
,
b
=
color
except
:
except
(
TypeError
,
ValueError
)
:
raise
TurtleGraphicsError
(
"bad color arguments:
%
s"
%
str
(
color
))
if
self
.
_colormode
==
1.0
:
r
,
g
,
b
=
[
round
(
255.0
*
x
)
for
x
in
(
r
,
g
,
b
)]
...
...
@@ -2702,7 +2702,7 @@ class RawTurtle(TPen, TNavigator):
return
args
try
:
r
,
g
,
b
=
args
except
:
except
(
TypeError
,
ValueError
)
:
raise
TurtleGraphicsError
(
"bad color arguments:
%
s"
%
str
(
args
))
if
self
.
screen
.
_colormode
==
1.0
:
r
,
g
,
b
=
[
round
(
255.0
*
x
)
for
x
in
(
r
,
g
,
b
)]
...
...
@@ -3865,7 +3865,7 @@ def read_docstrings(lang):
try
:
# eval(key).im_func.__doc__ = docsdict[key]
eval
(
key
)
.
__doc__
=
docsdict
[
key
]
except
:
except
Exception
:
print
(
"Bad docstring-entry:
%
s"
%
key
)
_LANGUAGE
=
_CFG
[
"language"
]
...
...
@@ -3875,7 +3875,7 @@ try:
read_docstrings
(
_LANGUAGE
)
except
ImportError
:
print
(
"Cannot find docsdict for"
,
_LANGUAGE
)
except
:
except
Exception
:
print
(
"Unknown Error when trying to import
%
s-docstring-dictionary"
%
_LANGUAGE
)
...
...
Misc/NEWS
Dosyayı görüntüle @
e80b658d
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.6.0 alpha 3
Library
-------
- Issue #27238: Got rid of bare excepts in the turtle module. Original patch
by Jelle Zijlstra.
- Issue #27122: When an exception is raised within the context being managed
by a contextlib.ExitStack() and one of the exit stack generators
catches and raises it in a chain, do not re-raise the original exception
...
...
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