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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Basic Intro to Python Metaprogramming

82 点作者 nuclearsandwich将近 14 年前

4 条评论

iandanforth将近 14 年前
For me this article was written in reverse. For an intro I'd love to have had the 'code smell' example first to establish why I might care and when I might need this, and then dive into an example.
评论 #2772871 未加载
endgame将近 14 年前
Can everyone please stop shoehorning in random xkcd comics where they don't belong?
评论 #2772850 未加载
ciupicri将近 14 年前
<i>Forbidden</i><p><i>You don't have permission to access /2011/07/14/basic-intro-to-python-meta-programming/ on this server.</i>
irahul将近 14 年前
&#62;&#62;&#62; Foo = type("Foo", (FooBase,), {'bar' : 42})<p>is not equivalent to what the blog post says it is to. FooBase should be defined before running this, and the blog post's equivalent make it look like this statement defines FooBase as well.
评论 #2772735 未加载