Skip to content

Instantly share code, notes, and snippets.

@kalda341
Created May 11, 2015 06:01
Show Gist options
  • Save kalda341/ade054bfb83ea3d723ff to your computer and use it in GitHub Desktop.
Save kalda341/ade054bfb83ea3d723ff to your computer and use it in GitHub Desktop.
import constants
"""
Generates a py_id prefix matching the classname and counts uniquely across
classes
"""
class KazooBlockMeta(type):
def __new__(klass, name, parents, dic):
dic['next_py_id'] = 1
dic['py_id_prefix'] = name.lower()
return super(KazooBlockMeta, klass).__new__(klass, name, parents, dic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment