Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:18:16+00:00 2026-06-08T08:18:16+00:00

In particular, it outputs: >>> dis.dis(None) 22 0 LOAD_FAST 0 (x) 3 LOAD_CONST 1

  • 0

In particular, it outputs:

>>> dis.dis(None)
 22           0 LOAD_FAST                0 (x)
              3 LOAD_CONST               1 (None)
              6 COMPARE_OP               8 (is)
              9 POP_JUMP_IF_FALSE       23

 23          12 LOAD_GLOBAL              1 (distb)
             15 CALL_FUNCTION            0
             18 POP_TOP             

 24          19 LOAD_CONST               1 (None)
             22 RETURN_VALUE        

 25     >>   23 LOAD_GLOBAL              2 (isinstance)
             26 LOAD_FAST                0 (x)
             29 LOAD_GLOBAL              3 (types)
             32 LOAD_ATTR                4 (InstanceType)
             35 CALL_FUNCTION            2
             38 POP_JUMP_IF_FALSE       53

 26          41 LOAD_FAST                0 (x)
             44 LOAD_ATTR                5 (__class__)
             47 STORE_FAST               0 (x)
             50 JUMP_FORWARD             0 (to 53)

 27     >>   53 LOAD_GLOBAL              6 (hasattr)
             56 LOAD_FAST                0 (x)
             59 LOAD_CONST               2 ('im_func')
             62 CALL_FUNCTION            2
             65 POP_JUMP_IF_FALSE       80

 28          68 LOAD_FAST                0 (x)
             71 LOAD_ATTR                7 (im_func)
             74 STORE_FAST               0 (x)
             77 JUMP_FORWARD             0 (to 80)

 29     >>   80 LOAD_GLOBAL              6 (hasattr)
             83 LOAD_FAST                0 (x)
             86 LOAD_CONST               3 ('func_code')
             89 CALL_FUNCTION            2
             92 POP_JUMP_IF_FALSE      107

 30          95 LOAD_FAST                0 (x)
             98 LOAD_ATTR                8 (func_code)
            101 STORE_FAST               0 (x)
            104 JUMP_FORWARD             0 (to 107)

 31     >>  107 LOAD_GLOBAL              6 (hasattr)
            110 LOAD_FAST                0 (x)
            113 LOAD_CONST               4 ('__dict__')
            116 CALL_FUNCTION            2
            119 POP_JUMP_IF_FALSE      246

 32         122 LOAD_FAST                0 (x)
            125 LOAD_ATTR                9 (__dict__)
            128 LOAD_ATTR               10 (items)
            131 CALL_FUNCTION            0
            134 STORE_FAST               1 (items)

 33         137 LOAD_FAST                1 (items)
            140 LOAD_ATTR               11 (sort)
            143 CALL_FUNCTION            0
            146 POP_TOP             

 34         147 SETUP_LOOP             174 (to 324)
            150 LOAD_FAST                1 (items)
            153 GET_ITER            
        >>  154 FOR_ITER                85 (to 242)
            157 UNPACK_SEQUENCE          2
            160 STORE_FAST               2 (name)
            163 STORE_FAST               3 (x1)

 35         166 LOAD_GLOBAL              2 (isinstance)
            169 LOAD_FAST                3 (x1)
            172 LOAD_GLOBAL             12 (_have_code)
            175 CALL_FUNCTION            2
            178 POP_JUMP_IF_FALSE      154

 36         181 LOAD_CONST               5 ('Disassembly of %s:')
            184 LOAD_FAST                2 (name)
            187 BINARY_MODULO       
            188 PRINT_ITEM          
            189 PRINT_NEWLINE       

 37         190 SETUP_EXCEPT            14 (to 207)

 38         193 LOAD_GLOBAL             13 (dis)
            196 LOAD_FAST                3 (x1)
            199 CALL_FUNCTION            1
            202 POP_TOP             
            203 POP_BLOCK           
            204 JUMP_FORWARD            28 (to 235)

 39     >>  207 DUP_TOP             
            208 LOAD_GLOBAL             14 (TypeError)
            211 COMPARE_OP              10 (exception match)
            214 POP_JUMP_IF_FALSE      234
            217 POP_TOP             
            218 STORE_FAST               4 (msg)
            221 POP_TOP             

 40         222 LOAD_CONST               6 ('Sorry:')
            225 PRINT_ITEM          
            226 LOAD_FAST                4 (msg)
            229 PRINT_ITEM          
            230 PRINT_NEWLINE       
            231 JUMP_FORWARD             1 (to 235)
        >>  234 END_FINALLY         

 41     >>  235 PRINT_NEWLINE       
            236 JUMP_ABSOLUTE          154
            239 JUMP_ABSOLUTE          154
        >>  242 POP_BLOCK           
            243 JUMP_FORWARD            78 (to 324)

 42     >>  246 LOAD_GLOBAL              6 (hasattr)
            249 LOAD_FAST                0 (x)
            252 LOAD_CONST               7 ('co_code')
            255 CALL_FUNCTION            2
            258 POP_JUMP_IF_FALSE      274

 43         261 LOAD_GLOBAL             15 (disassemble)
            264 LOAD_FAST                0 (x)
            267 CALL_FUNCTION            1
            270 POP_TOP             
            271 JUMP_FORWARD            50 (to 324)

 44     >>  274 LOAD_GLOBAL              2 (isinstance)
            277 LOAD_FAST                0 (x)
            280 LOAD_GLOBAL             16 (str)
            283 CALL_FUNCTION            2
            286 POP_JUMP_IF_FALSE      302

 45         289 LOAD_GLOBAL             17 (disassemble_string)
            292 LOAD_FAST                0 (x)
            295 CALL_FUNCTION            1
            298 POP_TOP             
            299 JUMP_FORWARD            22 (to 324)

 47     >>  302 LOAD_GLOBAL             14 (TypeError)

 48         305 LOAD_CONST               8 ("don't know how to disassemble %s objects")

 49         308 LOAD_GLOBAL             18 (type)
            311 LOAD_FAST                0 (x)
            314 CALL_FUNCTION            1
            317 LOAD_ATTR               19 (__name__)
            320 BINARY_MODULO       
    -->     321 RAISE_VARARGS            2
        >>  324 LOAD_CONST               1 (None)
            327 RETURN_VALUE 

Why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:18:18+00:00Added an answer on June 8, 2026 at 8:18 am

    From the documentation:

    dis.dis([bytesource])

    Disassemble the bytesource object. bytesource can denote either a module, a class, a method, a function, or a code object. For a module, it disassembles all functions. For a class, it disassembles all methods. For a single code sequence, it prints one line per bytecode instruction. If no object is provided, it disassembles the last traceback.

    Emphasis mine.


    If you try it in a new interpreter there is no last traceback, so you get an error:

    >>> import dis
    >>> dis.dis(None)
    
    Traceback (most recent call last):
      File "<pyshell#1>", line 1, in <module>
        dis.dis(None)
      File "C:\Python27\lib\dis.py", line 23, in dis
        distb()
      File "C:\Python27\lib\dis.py", line 57, in distb
        raise RuntimeError, "no last traceback to disassemble"
    RuntimeError: no last traceback to disassemble
    

    But now if you try the same command it disassembles the RuntimeError you just got:

    >>> dis.dis(None)
     53           0 LOAD_FAST                0 (tb)
                  3 LOAD_CONST               2 (None)
                  6 COMPARE_OP               8 (is)
                  9 POP_JUMP_IF_FALSE       82
    
     54          12 SETUP_EXCEPT            13 (to 28)
    
     55          15 LOAD_GLOBAL              1 (sys)
                 18 LOAD_ATTR                2 (last_traceback)
                 21 STORE_FAST               0 (tb)
                 24 POP_BLOCK           
                 25 JUMP_FORWARD            26 (to 54)
    
     56     >>   28 DUP_TOP             
                 29 LOAD_GLOBAL              3 (AttributeError)
                 32 COMPARE_OP              10 (exception match)
                 35 POP_JUMP_IF_FALSE       53
                 38 POP_TOP             
                 39 POP_TOP             
                 40 POP_TOP             
    
     57          41 LOAD_GLOBAL              4 (RuntimeError)
                 44 LOAD_CONST               1 ('no last traceback to disassemble')
        -->      47 RAISE_VARARGS            2
                 50 JUMP_FORWARD             1 (to 54)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom script that outputs a list of particular products in csv
I've created a view which outputs a particular content type into a jCarousel. One
I want to apply output cache programmatically to a particular control. But when I'm
I would like my nmake output to go to a particular directory.
My project need to compare output(only urls) of google and yahoo for a particular
output.videoSettings = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(id)kCVPixelBufferPixelFormatTypeKey]; I get this error on this particular
Is there anyway to get or intercept the output stream (System.out in particular) from
Is there any way to find particular C language function's input and output parameters
I have a situation where particular elements (xs:simpleType, xs:complexType) are placed in the output
I'm trying to style some Drupal output. In particular, I'm trying to reference a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.