File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class Results(object):
56
56
def __init__ (self , json ):
57
57
self .type = {'A' : 'answer' , 'D' : 'disambiguation' ,
58
58
'C' : 'category' , 'N' : 'name' ,
59
- 'E' : 'exclusive' , '' : 'nothing' }[ json .get ('Type' ,'' )]
59
+ 'E' : 'exclusive' , '' : 'nothing' }. get ( json .get ('Type' ,'' ), '' )
60
60
61
61
self .json = json
62
62
self .api_version = None # compat
@@ -171,9 +171,9 @@ def main():
171
171
keys .sort ()
172
172
for key in keys :
173
173
sys .stdout .write (key )
174
- if type (q .json [key ]) in [str ,unicode ]: print ':' , q .json [key ]
174
+ if type (q .json [key ]) in [str ,unicode ]: print ( ':' , q .json [key ])
175
175
else :
176
176
sys .stdout .write ('\n ' )
177
- for i in q .json [key ]: print '\t ' ,i
177
+ for i in q .json [key ]: print ( '\t ' ,i )
178
178
else :
179
- print 'Usage: %s [query]' % sys .argv [0 ]
179
+ print ( 'Usage: %s [query]' % sys .argv [0 ])
You can’t perform that action at this time.
0 commit comments