Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)
Returns a flat list of all baseclasses according to the method
resolution order. Includes `cls`.

        def baseclasses(cls, bases=None):
    """Returns a flat list of all baseclasses according to the method
    resolution order. Includes `cls`.
    """
    if bases is None:
        bases = []

    bases.append(cls)

    for base in cls.__bases__:
        if base not in bases:
            baseclasses(base, bases)

    return bases
        


src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/templating.py   ftw.pdfgenerator(Download)
from ftw.pdfgenerator.interfaces import ITemplating
from ftw.pdfgenerator.utils import baseclasses
from mako.lookup import TemplateLookup
from zope.interface import implements
import inspect
            # We need to get rid of the metaclass so that we know
            # where the class is defined.
            classes = baseclasses(self.__class__)[1:]
        else:
            classes = baseclasses(self.__class__)