--- title: print("Hello World"),然後呢? - 高見龍 tags: PyConTW2025, 2025-organize, 2025-共筆 --- # print("Hello World"),然後呢? - 高見龍 {%hackmd L_RLmFdeSD--CldirtUhCw %} <iframe src=https://app.sli.do/event/wvVryXbK1svSVovjwvhefg height=450 width=100%></iframe> :::success 本演講提供 AI 翻譯字幕及摘要,請點選這裡前往 >> [PyCon Taiwan AI Notebook](https://pycontw.connyaku.app/?room=qclRKwcFZcNqzv4GlreB) AI translation subtitles and summaries are available for this talk. Click here to access >> [PyCon Taiwan AI Notebook](https://pycontw.connyaku.app/?room=qclRKwcFZcNqzv4GlreB) ::: > Collaborative writing start from below > 從這裡開始共筆 Deck: [https://speakerdeck.com/eddie/print-hello-world?slide=12]() ### Python 是怎麼運作的 Plain Text → Tokenization → AST (Abstract Syntax Tree) → ByteCode → Virtual Machine 你要研究 Python 怎麼運作的話,會用到 `dis` 模組,`python -m dis hello.py` 會產出 ByteCode ### 原始碼追追追 Why? > 追原始碼有趣 > 可以看到平常看不到的東西 > 在網路上要筆戰贏面比較大,可以說自己看過原始碼 (笑) 我覺得很好玩! > 以前研究 Ruby 原始碼,看到大師也會用 ary, ary2, ary3 的命名方式,後面還出現 array2 > 以前分享過,下面做了一排 Ruby Commiter,大家大笑。早上講,下午就改掉了 看不懂 C 語言怎麼辦? > 以前可能沒辦法,現在有 AI 這次研究用的是 Python 3.12.6 GDB/LLDB `lldb ./python.exe hello.py` 設定中斷點,然後一行一行執行,這樣就可以慢慢追,不然加 print 再重 build, run 太慢了 今天分享的內容是 [為你自己讀 CPython 原始碼](https://kaochenlong.com/2024/10/15/dive-into-cpython-source-code.html) 內的 12, 13 章 --- Below is the part that speaker updated the talk/tutorial after speech 講者於演講後有更新或勘誤投影片的部份
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.