Created
May 11, 2015 06:01
-
-
Save kalda341/ade054bfb83ea3d723ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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