lambda s:[i['user_id']for i in get('http://api.stackexchange.com/users?inname=%s&site=codegolf'%utils.quote(s)).json()['items']if i['display_name']==s]
from requests import*
サンプル実行
>>> f=\
... lambda s:[i['user_id']for i in get('http://api.stackexchange.com/users?inname=%s&site=codegolf'%utils.quote(s)).json()['items']if i['display_name']==s]
>>> from requests import*
>>>
>>> tests = ['musicman523', 'Dennis', 'xnor', 'Leaky Nun', 'Community', 'Any user that does not exist', 'Alex', 'Leaky N', 'Jorge']
>>> for i in tests: print '%-30r -> %s'%(i, f(i))
...
'musicman523' -> [69054]
'Dennis' -> [12012, 13891, 14912, 24937]
'xnor' -> [20260]
'Leaky Nun' -> [48934]
'Community' -> [-1]
'Any user that does not exist' -> []
'Alex' -> [21536, 69198, 11192]
'Leaky N' -> []
'Jorge' -> [3716]
楽しい事実:結果は評判の高い順に並べられます。