All Samples(297) | Call(267) | Derive(0) | Import(30)
Return tuple of base classes (including cls) in method resolution order.
def getmro(cls):
"Return tuple of base classes (including cls) in method resolution order."
if hasattr(cls, "__mro__"):
return cls.__mro__
else:
result = []
_searchbases(cls, result)
return tuple(result)
def remove_redundant(classes):
redundant = set([types.ClassType]) # turn old-style classes to new
for c in classes:
redundant.update(inspect.getmro(c)[1:])
return tuple(uniques(classes, redundant))
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/pydoc.py ironruby(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/pydoc.py ironruby(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
src/p/y/pypy3-HEAD/lib-python/3.1.2/pydoc.py pypy3(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
src/p/y/pyvm-HEAD/projects/python_in_a_can/trunk/win32/python-2.7/Lib/pydoc.py pyvm(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
src/b/d/bdk-c-HEAD/trunk/workspace/script/python/Lib/pydoc.py bdk-c(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
src/p/y/pywii-HEAD/Python-3.1.2/Lib/pydoc.py pywii(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
src/j/w/jwp_pkg_documentation-0.9.1/name/jwp/python/pkg_documentation/build.py jwp_pkg_documentation(Download)
i.append(create_obj_reference(x))
e.append(i)
if inspect.getmro(obj):
i = et.Element('mro')
for x in inspect.getmro(obj):
i.append(create_obj_reference(x))
yk, yv = y[2] if x[0] == kCLASS: # MRO based order. xmro = list([x.__name__ for x in inspect.getmro(xv)]) ymro = list([x.__name__ for x in inspect.getmro(yv)]) xmro.reverse() ymro.reverse()
src/s/t/stackless-HEAD/Lib/pydoc.py stackless(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
src/p/y/python2.6-cmake-HEAD/Lib/pydoc.py python2.6-cmake(Download)
hr = HorizontalRule()
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('<dl><dt>Method resolution order:</dt>\n')
push = contents.append
# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next