LoginSignup
2
1

More than 5 years have passed since last update.

Python > debug > disパッケージ > bytecodeの確認に使う

Last updated at Posted at 2018-01-18
動作環境
Python 3 (Python 3.5)

stackoverflowの質問にて、bytecodeの紹介がされていました。

answered 20 mins ago
Daniel Lee

dis.dis(f)

disパッケージ

code

import dis

def f():
    return 314

dis.dis(f)
run
 4           0 LOAD_CONST               1 (314)
              3 RETURN_VALUE
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1