推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
fasionchan
V2EX  ›  Python

最近在研究 Python 虚拟机源码,分享下对 str 对象底层结构学习的心得

  •  
  •   fasionchan · Jul 27, 2020 · 2332 views
    This topic created in 2253 days ago, the information mentioned may be changed or developed.

    如题:str 对象,统一的 Unicode 字符串

    有兴趣的童鞋欢迎一起组队研究,这样更容易坚持下去……

    5 replies  •  2020-07-28 17:43:13 +08:00
    fgd
        1
    fgd  
       Jul 27, 2020 via iPhone
    不错不错
    hxysnail
        2
    hxysnail  
       Jul 28, 2020
    正需要这样的机会!赞!
    SjwNo1
        3
    SjwNo1  
       Jul 28, 2020
    想就此问个问题:PVM 的主要工作是把字节码转成机器码吗?
    fasionchan
        4
    fasionchan  
    OP
       Jul 28, 2020
    @SjwNo1 不是,字节码不会直接转换成机器码,而是由虚拟机解释执行。虚拟机内部是一个由 C 实现的 for 循环,逐个遍历待执行字节码; for 循环每次迭代是一个巨大的 switch case,针对不同字节码执行对应的处理逻辑。
    SjwNo1
        5
    SjwNo1  
       Jul 28, 2020
    @fasionchan 谢谢解惑
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   944 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 18:22 · PVG 02:22 · LAX 11:22 · JFK 14:22
    ♥ Do have faith in what you're doing.