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.

Basic Intro to Python Metaprogramming

82 pointsby nuclearsandwichalmost 14 years ago

4 comments

iandanforthalmost 14 years ago
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 未加载
endgamealmost 14 years ago
Can everyone please stop shoehorning in random xkcd comics where they don't belong?
评论 #2772850 未加载
ciupicrialmost 14 years ago
<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>
irahulalmost 14 years ago
&#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 未加载