TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Perl in Python

4 点作者 kingrolo超过 5 年前

1 comment

dalke超过 5 年前
I did something somewhat like this about 10 years ago, at <a href="http:&#x2F;&#x2F;www.dalkescientific.com&#x2F;writings&#x2F;diary&#x2F;archive&#x2F;2008&#x2F;03&#x2F;10&#x2F;python4ply_tutorial_3.html" rel="nofollow">http:&#x2F;&#x2F;www.dalkescientific.com&#x2F;writings&#x2F;diary&#x2F;archive&#x2F;2008&#x2F;0...</a> :<p><pre><code> for line in open(&quot;python_yacc.py&quot;): if line =~ m&#x2F;def (?P&lt;name&gt;\w+) *(?P&lt;args&gt;\(.*\)) *:&#x2F;: print repr($1), repr($args) </code></pre> I did not use import hooks, like this project does.<p>It got appreciative hisses when I did a lightning talk about it at a PyCon.