Skip to content

Instantly share code, notes, and snippets.

View nithinmanne's full-sized avatar

Nithin Manne nithinmanne

View GitHub Profile
@nithinmanne
nithinmanne / create_registerer.py
Created September 16, 2020 18:57
Code to create a simple registerer.
"""This function returns two functions, the first is used to call by the registered
functions based on the first argument(index or key). The second is a decorator
used to register a new function. The decorator takes a key as argument or if no
argument is provided, it taked the function name as key.
Usage:
call, register = create_registerer()
@register('first')
def a(arg): pass

Keybase proof

I hereby claim:

  • I am nithinmanne on github.
  • I am nithinmanne (https://keybase.io/nithinmanne) on keybase.
  • I have a public key whose fingerprint is 47C3 96D0 8FF5 9FEB 9290 6590 ED1D C1F6 F2A5 78F7

To claim this, I am signing this object: