| Trees | Indices | Help |
|---|
|
|
Metaclass which assigns a `_compiler_dispatch` method to classes having a `__visit_name__` attribute.
The _compiler_dispatch attribute becomes an instance method which looks approximately like the following:
def _compiler_dispatch (self, visitor, **kw):
'''Look for an attribute named "visit_" + self.__visit_name__
on the visitor, and call it with the same kw params.'''
visit_attr = 'visit_%s' % self.__visit_name__
return getattr(visitor, visit_attr)(self, **kw)
Classes having no __visit_name__ attribute will remain unaffected.
|
|||
| the object's type |
|
||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Tue Sep 10 09:30:19 2013 | http://epydoc.sourceforge.net |