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.

Things you didn't know about Python

181 pointsby d0ugalover 12 years ago

9 comments

Permitover 12 years ago
Do these postings of slides ever help anyone? I never seem to get anything out of just clicking through slides with no explanations. It's essentially reading 20 unjustified bullet points to me.
评论 #4616779 未加载
评论 #4616781 未加载
评论 #4616928 未加载
评论 #4617203 未加载
评论 #4616985 未加载
评论 #4617303 未加载
评论 #4617025 未加载
评论 #4617556 未加载
xiover 12 years ago
Armin's implementation of `cached_property` is not entirely correct. Well, it works, but the branch where `value` is not `missing` is never executed: the object's `__dict__` takes precedence over the descriptor <i>as long as the descriptor does not define `__set__` method</i>.<p>Here is an implementation of `cached_property` I use:<p><pre><code> class cached_property(object): def __init__(self, fget): self.fget = fget self.__name__ = fget.__name__ self.__module__ = fget.__module__ self.__doc__ = fget.__doc__ def __get__(self, obj, objtype=None): if obj is None: return self value = self.fget(obj) # For a non-data descriptor (`__set__` is not defined), # `__dict__` takes precedence. obj.__dict__[self.__name__] = value return value</code></pre>
评论 #4620234 未加载
cobychappleover 12 years ago
Best slide for me was "worry less &#38; get stuff done". Good advice.
timkellerover 12 years ago
Saw the talk in-person at Pycon South Africa this morning. Excellent presentation - thanks Armin.
评论 #4616524 未加载
andrewcookeover 12 years ago
some context for slide 99? (which says "screw HN")
评论 #4616324 未加载
评论 #4616462 未加载
评论 #4616311 未加载
tripzilchover 12 years ago
It looks very interesting, but I feel I'm missing half by seeing just the slides. Is there a video of this talk somewhere?
评论 #4616566 未加载
foxhopover 12 years ago
If you are interested in learning more about python and caching I wrote a post about it couple days ago:<p><a href="http://russell.ballestrini.net/explaining-cache-with-python/" rel="nofollow">http://russell.ballestrini.net/explaining-cache-with-python/</a>
评论 #4617521 未加载
pinchyfingersover 12 years ago
I have a ton of respect for Armin. Can't wait for this video to be posted.
ronreiterover 12 years ago
I especially liked the last slide :)