TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Adding a new statement to Python

100 pointsby motterabout 13 years ago

5 comments

ghcabout 13 years ago
I would have liked to see how easy it is to add a new statement to pypy for comparison's sake.
评论 #3694089 未加载
perfunctoryabout 13 years ago
Very useful post I think. Not to depreciate Python the language, but it might be interesting to compare "adding a new statement to Python" with "adding a new statement to Lisp". Especially for people struggling to grasp Lisp's benefits.
评论 #3692994 未加载
评论 #3693624 未加载
评论 #3692941 未加载
评论 #3694383 未加载
motterabout 13 years ago
I was reminded of this by the post on the goto statement -- having used the AST module recently in a limited capacity[1], I was really impressed by how easy it was to use. There's a good pycon talk for those interested specifically in this part of the process[2], and you can also see the full grammar[3].<p>[1] <a href="http://blueprintforge.com/blog/2012/02/27/static-modification-of-python-with-python-the-ast-module/" rel="nofollow">http://blueprintforge.com/blog/2012/02/27/static-modificatio...</a><p>[2] <a href="http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-what-would-you-do-with-an-ast-4898264" rel="nofollow">http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-wha...</a><p>[3] <a href="http://docs.python.org/library/ast.html#abstract-grammar" rel="nofollow">http://docs.python.org/library/ast.html#abstract-grammar</a>
thomasleeabout 13 years ago
Here's my original paper on the topic in case folks are interested:<p><a href="http://tomlee.co/wp-content/uploads/2008/12/python-language-internals.pdf" rel="nofollow">http://tomlee.co/wp-content/uploads/2008/12/python-language-...</a>
drstrangevibesabout 13 years ago
How well do you know the Sutras?<p>Special cases aren't special enough to break the rules. ... There should be one-- and preferably only one --obvious way to do it.
评论 #3693115 未加载
评论 #3693128 未加载