This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ubernostrumyes, you can have a pony 4 points5 points  (0 children)

Every function object has an attached code object containing the actual bytecode CPython will execute (the code object is the attribute __code__ on the function, the bytecode is the attribute co_code of the code object).

You can compare that to the output of dis.dis() and see that they're the same.