Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebbef7b

Browse files
committed
Use dict literals
1 parenteaef6d0 commitebbef7b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎bpython/curtsiesfrontend/manual_readline.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def add_config_attr(self, config_attr, func):
7070
defcall(self,key,**kwargs):
7171
func=self[key]
7272
params=getargspec(func)
73-
args=dict((k,v)fork,vinkwargs.items()ifkinparams)
73+
args={k:vfork,vinkwargs.items()ifkinparams}
7474
returnfunc(**args)
7575

7676
defcall_without_cut(self,key,**kwargs):

‎bpython/simpleeval.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ def _convert(node):
9898
elifisinstance(node,ast.List):
9999
returnlist(map(_convert,node.elts))
100100
elifisinstance(node,ast.Dict):
101-
returndict(
102-
(_convert(k),_convert(v))
101+
return{
102+
_convert(k):_convert(v)
103103
fork,vinzip(node.keys,node.values)
104-
)
104+
}
105105
elifisinstance(node,ast.Set):
106106
returnset(map(_convert,node.elts))
107107
elif (

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp