Skip to content

Instantly share code, notes, and snippets.

@snowleung
Created October 21, 2015 02:12
Show Gist options
  • Save snowleung/874b44b621bbae1fe61e to your computer and use it in GitHub Desktop.
Save snowleung/874b44b621bbae1fe61e to your computer and use it in GitHub Desktop.
for api error code format
def render_format(kv):
k = kv[0]
v = kv[1]
with_span = lambda: '{}{}'.format(v[1], ' '*(48-len(v[1])))
return '| {} | {} | {}|'.format(v[0], k, with_span())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment