Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
819dd004
Commit
819dd004
authored
Jul 09, 2003
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF patch #768187: replace apply(f, args, kwds) with f(*args, **kwds)
parent
6fbf0121
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
16 deletions
+14
-16
Lib/idlelib/ColorDelegator.py
Lib/idlelib/ColorDelegator.py
+1
-1
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+1
-1
Lib/idlelib/MultiStatusBar.py
Lib/idlelib/MultiStatusBar.py
+1
-1
Lib/idlelib/OutputWindow.py
Lib/idlelib/OutputWindow.py
+2
-2
Lib/idlelib/Percolator.py
Lib/idlelib/Percolator.py
+2
-2
Lib/idlelib/PyShell.py
Lib/idlelib/PyShell.py
+1
-1
Lib/idlelib/TreeWidget.py
Lib/idlelib/TreeWidget.py
+1
-1
Lib/idlelib/WidgetRedirector.py
Lib/idlelib/WidgetRedirector.py
+2
-2
Lib/idlelib/configDialog.py
Lib/idlelib/configDialog.py
+2
-3
Lib/idlelib/keybindingDialog.py
Lib/idlelib/keybindingDialog.py
+1
-2
No files found.
Lib/idlelib/ColorDelegator.py
View file @
819dd004
...
@@ -50,7 +50,7 @@ class ColorDelegator(Delegator):
...
@@ -50,7 +50,7 @@ class ColorDelegator(Delegator):
def
config_colors
(
self
):
def
config_colors
(
self
):
for
tag
,
cnf
in
self
.
tagdefs
.
items
():
for
tag
,
cnf
in
self
.
tagdefs
.
items
():
if
cnf
:
if
cnf
:
apply
(
self
.
tag_configure
,
(
tag
,),
cnf
)
self
.
tag_configure
(
tag
,
**
cnf
)
self
.
tag_raise
(
'sel'
)
self
.
tag_raise
(
'sel'
)
def
LoadTagDefs
(
self
):
def
LoadTagDefs
(
self
):
...
...
Lib/idlelib/EditorWindow.py
View file @
819dd004
...
@@ -792,7 +792,7 @@ class EditorWindow:
...
@@ -792,7 +792,7 @@ class EditorWindow:
text
.
keydefs
=
keydefs
text
.
keydefs
=
keydefs
for
event
,
keylist
in
keydefs
.
items
():
for
event
,
keylist
in
keydefs
.
items
():
if
keylist
:
if
keylist
:
apply
(
text
.
event_add
,
(
event
,)
+
tuple
(
keylist
)
)
text
.
event_add
(
event
,
*
keylist
)
def
fill_menus
(
self
,
defs
=
None
,
keydefs
=
None
):
def
fill_menus
(
self
,
defs
=
None
,
keydefs
=
None
):
"""Add appropriate entries to the menus and submenus
"""Add appropriate entries to the menus and submenus
...
...
Lib/idlelib/MultiStatusBar.py
View file @
819dd004
...
@@ -5,7 +5,7 @@ class MultiStatusBar(Frame):
...
@@ -5,7 +5,7 @@ class MultiStatusBar(Frame):
def
__init__
(
self
,
master
=
None
,
**
kw
):
def
__init__
(
self
,
master
=
None
,
**
kw
):
if
master
is
None
:
if
master
is
None
:
master
=
Tk
()
master
=
Tk
()
apply
(
Frame
.
__init__
,
(
self
,
master
),
kw
)
Frame
.
__init__
(
self
,
master
,
**
kw
)
self
.
labels
=
{}
self
.
labels
=
{}
def
set_label
(
self
,
name
,
text
=
''
,
side
=
LEFT
):
def
set_label
(
self
,
name
,
text
=
''
,
side
=
LEFT
):
...
...
Lib/idlelib/OutputWindow.py
View file @
819dd004
...
@@ -13,7 +13,7 @@ class OutputWindow(EditorWindow):
...
@@ -13,7 +13,7 @@ class OutputWindow(EditorWindow):
"""
"""
def
__init__
(
self
,
*
args
):
def
__init__
(
self
,
*
args
):
apply
(
EditorWindow
.
__init__
,
(
self
,)
+
args
)
EditorWindow
.
__init__
(
self
,
*
args
)
self
.
text
.
bind
(
"<<goto-file-line>>"
,
self
.
goto_file_line
)
self
.
text
.
bind
(
"<<goto-file-line>>"
,
self
.
goto_file_line
)
# Customize EditorWindow
# Customize EditorWindow
...
@@ -136,7 +136,7 @@ class OnDemandOutputWindow:
...
@@ -136,7 +136,7 @@ class OnDemandOutputWindow:
text
=
owin
.
text
text
=
owin
.
text
for
tag
,
cnf
in
self
.
tagdefs
.
items
():
for
tag
,
cnf
in
self
.
tagdefs
.
items
():
if
cnf
:
if
cnf
:
apply
(
text
.
tag_configure
,
(
tag
,),
cnf
)
text
.
tag_configure
(
tag
,
**
cnf
)
text
.
tag_raise
(
'sel'
)
text
.
tag_raise
(
'sel'
)
self
.
write
=
self
.
owin
.
write
self
.
write
=
self
.
owin
.
write
...
...
Lib/idlelib/Percolator.py
View file @
819dd004
...
@@ -59,10 +59,10 @@ def main():
...
@@ -59,10 +59,10 @@ def main():
Delegator
.
__init__
(
self
,
None
)
Delegator
.
__init__
(
self
,
None
)
def
insert
(
self
,
*
args
):
def
insert
(
self
,
*
args
):
print
self
.
name
,
": insert"
,
args
print
self
.
name
,
": insert"
,
args
apply
(
self
.
delegate
.
insert
,
args
)
self
.
delegate
.
insert
(
*
args
)
def
delete
(
self
,
*
args
):
def
delete
(
self
,
*
args
):
print
self
.
name
,
": delete"
,
args
print
self
.
name
,
": delete"
,
args
apply
(
self
.
delegate
.
delete
,
args
)
self
.
delegate
.
delete
(
*
args
)
root
=
Tk
()
root
=
Tk
()
root
.
wm_protocol
(
"WM_DELETE_WINDOW"
,
root
.
quit
)
root
.
wm_protocol
(
"WM_DELETE_WINDOW"
,
root
.
quit
)
text
=
Text
()
text
=
Text
()
...
...
Lib/idlelib/PyShell.py
View file @
819dd004
...
@@ -77,7 +77,7 @@ class PyShellEditorWindow(EditorWindow):
...
@@ -77,7 +77,7 @@ class PyShellEditorWindow(EditorWindow):
def
__init__
(
self
,
*
args
):
def
__init__
(
self
,
*
args
):
self
.
breakpoints
=
[]
self
.
breakpoints
=
[]
apply
(
EditorWindow
.
__init__
,
(
self
,)
+
args
)
EditorWindow
.
__init__
(
self
,
*
args
)
self
.
text
.
bind
(
"<<set-breakpoint-here>>"
,
self
.
set_breakpoint_here
)
self
.
text
.
bind
(
"<<set-breakpoint-here>>"
,
self
.
set_breakpoint_here
)
self
.
text
.
bind
(
"<<clear-breakpoint-here>>"
,
self
.
clear_breakpoint_here
)
self
.
text
.
bind
(
"<<clear-breakpoint-here>>"
,
self
.
clear_breakpoint_here
)
self
.
text
.
bind
(
"<<open-python-shell>>"
,
self
.
flist
.
open_shell
)
self
.
text
.
bind
(
"<<open-python-shell>>"
,
self
.
flist
.
open_shell
)
...
...
Lib/idlelib/TreeWidget.py
View file @
819dd004
...
@@ -414,7 +414,7 @@ class ScrolledCanvas:
...
@@ -414,7 +414,7 @@ class ScrolledCanvas:
self
.
frame
=
Frame
(
master
)
self
.
frame
=
Frame
(
master
)
self
.
frame
.
rowconfigure
(
0
,
weight
=
1
)
self
.
frame
.
rowconfigure
(
0
,
weight
=
1
)
self
.
frame
.
columnconfigure
(
0
,
weight
=
1
)
self
.
frame
.
columnconfigure
(
0
,
weight
=
1
)
self
.
canvas
=
apply
(
Canvas
,
(
self
.
frame
,),
opts
)
self
.
canvas
=
Canvas
(
self
.
frame
,
**
opts
)
self
.
canvas
.
grid
(
row
=
0
,
column
=
0
,
sticky
=
"nsew"
)
self
.
canvas
.
grid
(
row
=
0
,
column
=
0
,
sticky
=
"nsew"
)
self
.
vbar
=
Scrollbar
(
self
.
frame
,
name
=
"vbar"
)
self
.
vbar
=
Scrollbar
(
self
.
frame
,
name
=
"vbar"
)
self
.
vbar
.
grid
(
row
=
0
,
column
=
1
,
sticky
=
"nse"
)
self
.
vbar
.
grid
(
row
=
0
,
column
=
1
,
sticky
=
"nse"
)
...
...
Lib/idlelib/WidgetRedirector.py
View file @
819dd004
...
@@ -51,7 +51,7 @@ class WidgetRedirector:
...
@@ -51,7 +51,7 @@ class WidgetRedirector:
m
=
self
.
dict
.
get
(
cmd
)
m
=
self
.
dict
.
get
(
cmd
)
try
:
try
:
if
m
:
if
m
:
return
apply
(
m
,
args
)
return
m
(
*
args
)
else
:
else
:
return
self
.
tk
.
call
((
self
.
orig
,
cmd
)
+
args
)
return
self
.
tk
.
call
((
self
.
orig
,
cmd
)
+
args
)
except
TclError
:
except
TclError
:
...
@@ -84,7 +84,7 @@ def main():
...
@@ -84,7 +84,7 @@ def main():
global
orig_insert
global
orig_insert
def
my_insert
(
*
args
):
def
my_insert
(
*
args
):
print
"insert"
,
args
print
"insert"
,
args
apply
(
orig_insert
,
args
)
orig_insert
(
*
args
)
orig_insert
=
redir
.
register
(
"insert"
,
my_insert
)
orig_insert
=
redir
.
register
(
"insert"
,
my_insert
)
root
.
mainloop
()
root
.
mainloop
()
...
...
Lib/idlelib/configDialog.py
View file @
819dd004
...
@@ -794,8 +794,7 @@ class ConfigDialog(Toplevel):
...
@@ -794,8 +794,7 @@ class ConfigDialog(Toplevel):
if
self
.
fgHilite
.
get
():
plane
=
'foreground'
if
self
.
fgHilite
.
get
():
plane
=
'foreground'
else
:
plane
=
'background'
else
:
plane
=
'background'
sampleElement
=
self
.
themeElements
[
self
.
highlightTarget
.
get
()][
0
]
sampleElement
=
self
.
themeElements
[
self
.
highlightTarget
.
get
()][
0
]
apply
(
self
.
textHighlightSample
.
tag_config
,
self
.
textHighlightSample
.
tag_config
(
sampleElement
,
**
{
plane
:
newColour
})
(
sampleElement
,),{
plane
:
newColour
})
theme
=
self
.
customTheme
.
get
()
theme
=
self
.
customTheme
.
get
()
themeElement
=
sampleElement
+
'-'
+
plane
themeElement
=
sampleElement
+
'-'
+
plane
self
.
AddChangedItem
(
'highlight'
,
theme
,
themeElement
,
newColour
)
self
.
AddChangedItem
(
'highlight'
,
theme
,
themeElement
,
newColour
)
...
@@ -890,7 +889,7 @@ class ConfigDialog(Toplevel):
...
@@ -890,7 +889,7 @@ class ConfigDialog(Toplevel):
colours
[
'foreground'
]
=
themeDict
[
element
+
'-foreground'
]
colours
[
'foreground'
]
=
themeDict
[
element
+
'-foreground'
]
if
themeDict
.
has_key
(
element
+
'-background'
):
if
themeDict
.
has_key
(
element
+
'-background'
):
colours
[
'background'
]
=
themeDict
[
element
+
'-background'
]
colours
[
'background'
]
=
themeDict
[
element
+
'-background'
]
apply
(
self
.
textHighlightSample
.
tag_config
,(
element
,),
colours
)
self
.
textHighlightSample
.
tag_config
(
element
,
**
colours
)
self
.
SetColourSample
()
self
.
SetColourSample
()
## def OnCheckUserHelpBrowser(self):
## def OnCheckUserHelpBrowser(self):
...
...
Lib/idlelib/keybindingDialog.py
View file @
819dd004
...
@@ -188,8 +188,7 @@ class GetKeysDialog(Toplevel):
...
@@ -188,8 +188,7 @@ class GetKeysDialog(Toplevel):
#make a tuple of most of the useful common 'final' keys
#make a tuple of most of the useful common 'final' keys
keys
=
(
self
.
alphanumKeys
+
self
.
punctuationKeys
+
self
.
functionKeys
+
keys
=
(
self
.
alphanumKeys
+
self
.
punctuationKeys
+
self
.
functionKeys
+
self
.
whitespaceKeys
+
self
.
editKeys
+
self
.
moveKeys
)
self
.
whitespaceKeys
+
self
.
editKeys
+
self
.
moveKeys
)
apply
(
self
.
listKeysFinal
.
insert
,
self
.
listKeysFinal
.
insert
(
END
,
*
keys
)
(
END
,)
+
keys
)
def
TranslateKey
(
self
,
key
):
def
TranslateKey
(
self
,
key
):
#translate from key list value to tkinter key-id
#translate from key list value to tkinter key-id
...
...
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