推荐学习书目
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
Tiande
V2EX  ›  Python

python3 对 尾递归 优化的 解释器 有推荐的吗?

  •  
  •   Tiande ·
    PRO
    · Jun 16, 2015 · 4423 views
    This topic created in 3996 days ago, the information mentioned may be changed or developed.
    看到 廖雪峰 递归函数 的那一章,
    想看看 解释器 优化后的 尾递归 结果 ,
    又不想一个个试,
    遂来咨询。

    谢谢 ;)

    PS: 请勿争执最好的解释器是啥...
    5 replies    2015-06-17 10:12:21 +08:00
    zenliver
        1
    zenliver  
       Jun 16, 2015   ❤️ 1
    python3现在还支持尾递归优化了? 找到了一定要分享一个啊
    Heartwork
        2
    Heartwork  
       Jun 16, 2015 via Android   ❤️ 1
    正想做这个,分享一下呗?:)
    Tiande
        3
    Tiande  
    OP
    PRO
       Jun 16, 2015
    @zenliver
    @Heartwork
    哈?那就是没有喽 =。=
    太遗憾了...
    Heartwork
        4
    Heartwork  
       Jun 16, 2015 via Android
    不是,我是想看看对尾递归优化的算法是什么样的,有文章的话我看看能不能用在我的解释器上。
    tsingyi
        5
    tsingyi  
       Jun 17, 2015   ❤️ 1
    没有见到过python3的解释器会做尾递归优化的,只是想看优化后的结果的话可以像python2一样写个优化的decorator,这里有个例子:

    http://code.activestate.com/recipes/474088-tail-call-optimization-decorator/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3149 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 58ms · UTC 14:22 · PVG 22:22 · LAX 07:22 · JFK 10:22
    ♥ Do have faith in what you're doing.