sqlalchemy :: sql :: visitors :: VisitableType :: Class VisitableType
[frames] | no frames]

Type VisitableType

object --+    
         |    
      type --+
             |
            VisitableType

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.'''
       return getattr(visitor, 'visit_%s' % self.__visit_name__)(self, **kw)

Classes having no __visit_name__ attribute will remain unaffected.

Instance Methods
the object's type
__init__(cls, clsname, bases, clsdict)
x.__init__(...) initializes x; see help(type(x)) for signature

Inherited from type: __call__, __delattr__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __instancecheck__, __le__, __lt__, __ne__, __new__, __repr__, __setattr__, __subclasscheck__, __subclasses__, mro

Inherited from object: __format__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from type: __abstractmethods__, __base__, __bases__, __basicsize__, __dictoffset__, __flags__, __itemsize__, __mro__, __name__, __weakrefoffset__

Inherited from object: __class__

Method Details

__init__(cls, clsname, bases, clsdict)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Returns: the object's type
Overrides: object.__init__
(inherited documentation)