blob: ef995ac644512d88582fb78733ee510491b423e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env python
class Registry(object):
def __init__(self):
self._registry = {}
def get_class(self, language):
return self._registry[language]
def register(self, language, cls):
self._registry[language] = cls
registry = Registry()
|