~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/inspect.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-10-03 12:03:05 UTC
  • mto: (10.1.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 32.
  • Revision ID: james.westby@ubuntu.com-20091003120305-hij6yssh0figh590
Tags: upstream-2.6.3
ImportĀ upstreamĀ versionĀ 2.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
            or ismethod(object)
241
241
            or ismethoddescriptor(object))
242
242
 
243
 
def isgenerator(object):
244
 
    """Return true if the object is a generator object."""
245
 
    return isinstance(object, types.GeneratorType)
246
 
 
247
243
def isabstract(object):
248
244
    """Return true if the object is an abstract base class (ABC)."""
249
245
    return isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT
947
943
        tb = tb.tb_next
948
944
    return framelist
949
945
 
950
 
currentframe = sys._getframe
 
946
if hasattr(sys, '_getframe'):
 
947
    currentframe = sys._getframe
 
948
else:
 
949
    currentframe = lambda _=None: None
951
950
 
952
951
def stack(context=1):
953
952
    """Return a list of records for the stack above the caller's frame."""