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
57e41277
Kaydet (Commit)
57e41277
authored
Şub 08, 2014
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20167: Suppress 3.4 specific 'Exception ignored' messages.
Original patch by Tal Einat.
üst
bfd68bf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
MultiCall.py
Lib/idlelib/MultiCall.py
+23
-4
No files found.
Lib/idlelib/MultiCall.py
Dosyayı görüntüle @
57e41277
...
...
@@ -57,6 +57,13 @@ _modifier_names = dict([(name, number)
for
number
in
range
(
len
(
_modifiers
))
for
name
in
_modifiers
[
number
]])
# In 3.4, if no shell window is ever open, the underlying Tk widget is
# destroyed before .__del__ methods here are called. The following
# is used to selectively ignore shutdown exceptions to avoid
# 'Exception ignored' messages. See http://bugs.python.org/issue20167
APPLICATION_GONE
=
'''
\
can't invoke "bind" command: application has been destroyed'''
# A binder is a class which binds functions to one type of event. It has two
# methods: bind and unbind, which get a function and a parsed sequence, as
# returned by _parse_sequence(). There are two types of binders:
...
...
@@ -98,7 +105,12 @@ class _SimpleBinder:
def
__del__
(
self
):
if
self
.
handlerid
:
self
.
widget
.
unbind
(
self
.
widgetinst
,
self
.
sequence
,
self
.
handlerid
)
try
:
self
.
widget
.
unbind
(
self
.
widgetinst
,
self
.
sequence
,
self
.
handlerid
)
except
tkinter
.
TclError
as
e
:
if
e
.
args
[
0
]
==
APPLICATION_GONE
:
pass
# An int in range(1 << len(_modifiers)) represents a combination of modifiers
# (if the least significent bit is on, _modifiers[0] is on, and so on).
...
...
@@ -227,7 +239,11 @@ class _ComplexBinder:
def
__del__
(
self
):
for
seq
,
id
in
self
.
handlerids
:
self
.
widget
.
unbind
(
self
.
widgetinst
,
seq
,
id
)
try
:
self
.
widget
.
unbind
(
self
.
widgetinst
,
seq
,
id
)
except
tkinter
.
TclError
as
e
:
if
e
.
args
[
0
]
==
APPLICATION_GONE
:
break
# define the list of event types to be handled by MultiEvent. the order is
# compatible with the definition of event type constants.
...
...
@@ -390,8 +406,11 @@ def MultiCallCreator(widget):
func
,
triplets
=
self
.
__eventinfo
[
virtual
]
if
func
:
for
triplet
in
triplets
:
self
.
__binders
[
triplet
[
1
]]
.
unbind
(
triplet
,
func
)
try
:
self
.
__binders
[
triplet
[
1
]]
.
unbind
(
triplet
,
func
)
except
tkinter
.
TclError
as
e
:
if
e
.
args
[
0
]
==
APPLICATION_GONE
:
break
_multicall_dict
[
widget
]
=
MultiCall
return
MultiCall
...
...
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