Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Lib/dis.py

    r2 r388  
    77from opcode import __all__ as _opcodes_all
    88
    9 __all__ = ["dis","disassemble","distb","disco"] + _opcodes_all
     9__all__ = ["dis", "disassemble", "distb", "disco",
     10           "findlinestarts", "findlabels"] + _opcodes_all
    1011del _opcodes_all
     12
     13_have_code = (types.MethodType, types.FunctionType, types.CodeType,
     14              types.ClassType, type)
    1115
    1216def dis(x=None):
     
    1923        distb()
    2024        return
    21     if type(x) is types.InstanceType:
     25    if isinstance(x, types.InstanceType):
    2226        x = x.__class__
    2327    if hasattr(x, 'im_func'):
     
    2933        items.sort()
    3034        for name, x1 in items:
    31             if type(x1) in (types.MethodType,
    32                             types.FunctionType,
    33                             types.CodeType,
    34                             types.ClassType):
     35            if isinstance(x1, _have_code):
    3536                print "Disassembly of %s:" % name
    3637                try:
Note: See TracChangeset for help on using the changeset viewer.